Reads a byte array from given stream.

Namespace: FirstFloor.Documents.IO
Assembly: FirstFloor.Documents (in FirstFloor.Documents.dll) Version: 2.5.0.0 (2.5.1.0)

Syntax

C#
public static byte[] ReadBytes(
	this Stream stream,
	int length
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function ReadBytes ( _
	stream As Stream, _
	length As Integer _
) As Byte()
Visual C++
[ExtensionAttribute]
public:
static array<unsigned char>^ ReadBytes(
	Stream^ stream, 
	int length
)

Parameters

stream
Type: System.IO..::..Stream
The stream.
length
Type: System..::..Int32
The length.

Return Value

The byte array.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Stream. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .

See Also