Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BinaryReader.Read Method (Char[], Int32, Int32)

Reads count characters from the stream with index as the starting point in the character array.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public virtual int Read(
	char[] buffer,
	int index,
	int count
)

Parameters

buffer
Type: System.Char[]
The buffer to read data into.
index
Type: System.Int32
The starting point in the buffer at which to begin reading into the buffer.
count
Type: System.Int32
The number of characters to read.

Return Value

Type: System.Int32
The total number of characters read into the buffer. This might be less than the number of characters requested if that many characters are not currently available, or it might be zero if the end of the stream is reached.

ExceptionCondition
ArgumentException

The buffer length minus index is less than count.

ArgumentNullException

buffer is null.

ArgumentOutOfRangeException

index or count is negative.

ObjectDisposedException

The stream is closed.

IOException

An I/O error occurs.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2014 Microsoft