Click or drag to resize
BinaryReaderRead Method (Char, Int32, Int32)
Reads the specified number of characters from the stream, starting from a specified point in the character array.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public virtual int Read(
	char[] buffer,
	int index,
	int count
)

Parameters

buffer
Type: SystemChar
The buffer to read data into.
index
Type: SystemInt32
The starting point in the buffer at which to begin reading into the buffer.
count
Type: SystemInt32
The number of characters to read.

Return Value

Type: 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.
Exceptions
ExceptionCondition
ArgumentExceptionThe buffer length minus index is less than count. -or-The number of decoded characters to read is greater than count. This can happen if a Unicode decoder returns fallback characters or a surrogate pair.
ArgumentNullExceptionbuffer is null.
ArgumentOutOfRangeExceptionindex or count is negative.
ObjectDisposedExceptionThe stream is closed.
IOExceptionAn I/O error occurs.
See Also