Export (0) Print
Expand All

UnmanagedMemoryStream.Capacity Property

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

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