Click or drag to resize

MemoryStream(Byte, Int32, Int32, Boolean, Boolean) Constructor

Initializes a new instance of the CrestronIO.MemoryStream class based on the specified region of a byte array, with the CrestronIO.MemoryStream.CanWrite property set as specified, and the ability to call CrestronIO.MemoryStream.GetBuffer() set as specified.

Namespace: Crestron.SimplSharp.CrestronIO
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public MemoryStream(
	byte[] buffer,
	int index,
	int count,
	bool writable,
	bool publiclyVisible
)

Parameters

buffer  Byte
The array of unsigned bytes from which to create this stream.
index  Int32
The index into buffer at which the stream begins.
count  Int32
The length of the stream in bytes.
writable  Boolean
The setting of the CrestronIO.MemoryStream.CanWrite property, which determines whether the stream supports writing.
publiclyVisible  Boolean
true to enable CrestronIO.MemoryStream.GetBuffer(), which returns the unsigned byte array from which the stream was created; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullException buffer is null.
ArgumentOutOfRangeException index or count is negative.
ArgumentException The buffer length minus index is less than count.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also