UnmanagedMemoryStream.Capacity Property

July 28, 2014

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Gets the stream length (size) or the total amount of memory assigned to a stream (capacity).

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public long Capacity { get; }

Property Value

Type: System.Int64
The size or capacity of the stream.

ExceptionCondition
ObjectDisposedException

The stream is closed.

This property returns the capacity value provided to the constructor. If no capacity value was specified when the stream was initialized, this property returns the stream length.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft