NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MemoryStream Constructor

Creates either an empty MemoryStream with an expandable capacity, or a MemoryStream based on a specified array of bytes with a fixed capacity.

Overload List

Initializes a new MemoryStream with an expandable capacity initially set to zero.

[Visual Basic] Overloads Public Sub New()
[C#] public MemoryStream();
[C++] public: MemoryStream();
[JScript] public function MemoryStream();

Initializes a new MemoryStream with an expandable capacity initially set as specified.

[Visual Basic] Overloads Public Sub New(Integer)
[C#] public MemoryStream(int);
[C++] public: MemoryStream(int);
[JScript] public function MemoryStream(int);

Initializes a new MemoryStream based on the specified byte array.

[Visual Basic] Overloads Public Sub New(Byte())
[C#] public MemoryStream(byte[]);
[C++] public: MemoryStream(unsigned char*[]);
[JScript] public function MemoryStream(Byte[]);

Initializes a new MemoryStream based on the specified byte array with the CanWrite property set as specified.

[Visual Basic] Overloads Public Sub New(Byte(), Boolean)
[C#] public MemoryStream(byte[], bool);
[C++] public: MemoryStream(unsigned char*[], bool);
[JScript] public function MemoryStream(Byte[], Boolean);

Initializes a new MemoryStream based on the specified region (index) of a byte array.

[Visual Basic] Overloads Public Sub New(Byte(), Integer, Integer)
[C#] public MemoryStream(byte[], int, int);
[C++] public: MemoryStream(unsigned char*[], int, int);
[JScript] public function MemoryStream(Byte[], int, int);

Initializes a new MemoryStream based on the specified region of a byte array with the CanWrite property set as specified.

[Visual Basic] Overloads Public Sub New(Byte(), Integer, Integer, Boolean)
[C#] public MemoryStream(byte[], int, int, bool);
[C++] public: MemoryStream(unsigned char*[], int, int, bool);
[JScript] public function MemoryStream(Byte[], int, int, Boolean);

Initializes a new MemoryStream based on the specified region of a byte array with the CanWrite property set as specified.

[Visual Basic] Overloads Public Sub New(Byte(), Integer, Integer, Boolean, Boolean)
[C#] public MemoryStream(byte[], int, int, bool, bool);
[C++] public: MemoryStream(unsigned char*[], int, int, bool, bool);
[JScript] public function MemoryStream(Byte[], int, int, Boolean, Boolean);

See Also

MemoryStream Class | MemoryStream Members | System.IO Namespace