Create Method (Byte[], Int32, Int32, Int32)
Collapse the table of content
Expand the table of content

WindowsRuntimeBuffer.Create Method (Byte(), Int32, Int32, Int32)

For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
[SECURITY CRITICAL]

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a Windows.Storage.Streams.IBuffer interface that contains a specified range of bytes copied from a byte array. If the specified capacity is greater than the number of bytes copied, the rest of the buffer is zero-filled.

This API is not CLS-compliant. 

Namespace:  System.Runtime.InteropServices.WindowsRuntime
Assembly:  System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)

'Declaration
<CLSCompliantAttribute(False)> _
Public Shared Function Create ( _
	data As Byte(), _
	offset As Integer, _
	length As Integer, _
	capacity As Integer _
) As IBuffer

Parameters

data
Type: System.Byte ()
The byte array to copy from.
offset
Type: System.Int32
The offset in data from which copying begins.
length
Type: System.Int32
The number of bytes to copy.
capacity
Type: System.Int32
The maximum number of bytes the buffer can hold; if this is greater than length, the rest of the bytes in the buffer are initialized to 0 (zero).

Return Value

Type: Windows.Storage.Streams.IBuffer
A Windows.Storage.Streams.IBuffer interface that contains the specified range of bytes. If capacity is greater than length, the rest of the buffer is zero-filled.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft