Capacity Property

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.

Exception Condition

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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2015 Microsoft