TextSnapshotToTextReader.ReadBlock(Char[], Int32, Int32) Method

Definition

Reads a maximum of count characters from the current stream and writes the data to buffer, beginning at index.

public:
 override int ReadBlock(cli::array <char> ^ buffer, int index, int count);
public:
 override int ReadBlock(Platform::Array <char16> ^ buffer, int index, int count);
 override int ReadBlock(std::Array <char> const & buffer, int index, int count);
public override int ReadBlock (char[] buffer, int index, int count);
override this.ReadBlock : char[] * int * int -> int
Public Overrides Function ReadBlock (buffer As Char(), index As Integer, count As Integer) As Integer

Parameters

buffer
Char[]

When this method returns, contains the specified character array from the current source.

index
Int32

The place in buffer at which to begin writing.

count
Int32

The maximum number of characters to read.

Returns

The number of characters that have been read. The number will be less than or equal to count, depending on whether the data is available within the stream. This method returns zero if called when no more characters are left to read.

Exceptions

index or count is negative, or the buffer length minus index is less than count.

buffer is null.

The reader is closed.

Applies to