Windows apps
Collapse the table of content
Expand the table of content

WindowsRuntimeBuffer::Create Method (Int32)

.NET Framework (current version)

Returns an empty Windows.Storage.Streams.IBuffer interface that has the specified maximum capacity.

This API is not CLS-compliant. 

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

[CLSCompliantAttribute(false)]
public:
static IBuffer^ Create(
	int capacity
)

Parameters

capacity
Type: System::Int32

The maximum number of bytes the buffer can hold.

Return Value

Type: IBuffer
A Windows.Storage.Streams.IBuffer interface that has the specified capacity and a Length property equal to 0 (zero).

ExceptionCondition
ArgumentOutOfRangeException

capacity is less than 0 (zero).

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone Silverlight 8
Show:
© 2017 Microsoft