Click or drag to resize
BinaryReaderReadChars Method
Reads the specified number of characters from the current stream, returns the data in a character array, and advances the current position in accordance with the Encoding used and the specific character being read from the stream.

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

Parameters

count
Type: SystemInt32
The number of characters to read.

Return Value

Type: Char
A character array containing data read from the underlying stream. This might be less than the number of characters requested if the end of the stream is reached.
Exceptions
ExceptionCondition
ArgumentExceptionThe number of decoded characters to read is greater than count. This can happen if a Unicode decoder returns fallback characters or a surrogate pair.
ObjectDisposedExceptionThe stream is closed.
IOExceptionAn I/O error occurs.
ArgumentOutOfRangeExceptioncount is negative.
See Also