TextSnapshotToTextReader::Read Method (array<Char>^, Int32, Int32)

 

Reads the specified number of characters from the current stream and writes the data to the buffer, beginning at the specified location.

Namespace:   Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

public:
virtual int Read(
	array<wchar_t>^ buffer,
	int index,
	int count
) override

Parameters

buffer
Type: array<System::Char>^

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

index
Type: System::Int32

The place in buffer at which to begin writing.

count
Type: System::Int32

The maximum number of characters to read.

Return Value

Type: System::Int32

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.

Exception Condition
ArgumentNullException

buffer is null.

ArgumentOutOfRangeException

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

ObjectDisposedException

The reader is closed.

Return to top
Show: