Partager via


TextSnapshotToTextReader.Read Method

Definition

Overloads

Read()

Reads the next character from the input stream and advances the character position by one character.

Read(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.

Read()

Reads the next character from the input stream and advances the character position by one character.

public:
 override int Read();
public:
 override int Read();
 override int Read();
public override int Read ();
override this.Read : unit -> int
Public Overrides Function Read () As Integer

Returns

The next character from the input stream, or -1 if no more characters are available.

Exceptions

The reader is closed.

Applies to

Read(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.

public:
 override int Read(cli::array <char> ^ buffer, int index, int count);
public:
 override int Read(Platform::Array <char16> ^ buffer, int index, int count);
 override int Read(std::Array <char> const & buffer, int index, int count);
public override int Read (char[] buffer, int index, int count);
override this.Read : char[] * int * int -> int
Public Overrides Function Read (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