Gets or sets the number of bytes allocated for this stream.
Assembly: mscorlib (in mscorlib.dll)
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.
This code example is part of a larger example provided for the MemoryStream class.
Available since 8
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8.1