Mono Class Library: System.IO.MemoryStream Overview | MembersSystem.IO.MemoryStream Constructor |
Constructs and initializes a new non-resizable instance of the System.IO.MemoryStream class. [Edit]
|
Type Reason ArgumentNullException The buffer parameter is null. [Edit]
The Stream.CanRead, Stream.CanSeek, and Stream.CanWrite properties of the new instance of the System.IO.MemoryStream class are set to true. MemoryStream.Capacity is set to the length of the specified byte array.
Note: The new stream instance can be written to, but the MemoryStream.Capacity of the underlying byte array cannot be changed. The length of the stream cannot be set to a value greater than MemoryStream.Capacity , but the stream can be truncated (see MemoryStream.SetLength(long)).The new stream does not expose the underlying byte buffer, and calls to the MemoryStream.GetBuffer method throw UnauthorizedAccessException.
[Edit]
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0