MemoryStream Constructor (Byte(), Int32, Int32)
Initializes a new non-resizable instance of the MemoryStream class based on the specified region (index) of a byte array.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Sub New ( _ buffer As Byte(), _ index As Integer, _ count As Integer _ )
The length of the stream cannot be set to a value greater than the initial length of the specified byte array; however, the stream can be truncated (see SetLength).
Windows PhoneSystem.ArgumentNullException is thrown when trying to retrieve a MemoryStream object with a size of zero bytes from a resource file. On Windows, no exception is thrown when the length is equal to zero.