MemoryStream: Capacity (get)

Capacity

Gets the number of bytes allocated for this stream.



 Public Property Get Capacity ( ) As Long

Return Values

Long -  The length of the usable portion of the buffer for the stream.

Remarks

Capacity is the buffer length for system-provided byte arrays. Capacity cannot be set to a value less than the current length of the stream.

Read/Write.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionA capacity is set that is negative or less than the current length of the stream.
ObjectDisposedExceptionThe current stream is closed.
NotSupportedExceptionLet is invoked on a stream whose capacity cannot be modified.

See Also

Project CorLib Overview

Class MemoryStream Overview