System.IO.TextReader: Method Members

The methods of System.IO.TextReader are listed below. For a list of all members, see the TextReader Members list.

See Also: Inherited members from System.MarshalByRefObject

Public Methods

Close()

Closes the System.IO.TextReader and releases any system resources associated with the TextReader.

Dispose()

Releases all resources used by the System.IO.TextReader object.

Peek() : int

Reads the next character without changing the state of the reader or the character source. Returns the next available character without actually reading it from the reader.

Read() : int

Reads the next character from the text reader and advances the character position by one character.

Read(char[], int, int) : int

Reads a specified maximum number of characters from the current reader and writes the data to a buffer, beginning at the specified index.

ReadAsync(char[], int, int) : System.Threading.Tasks.Task<int>

Reads a specified maximum number of characters from the current text reader asynchronously and writes the data to a buffer, beginning at the specified index.

ReadBlock(char[], int, int) : int

Reads a specified maximum number of characters from the current text reader and writes the data to a buffer, beginning at the specified index.

ReadBlockAsync(char[], int, int) : System.Threading.Tasks.Task<int>

Reads a specified maximum number of characters from the current text reader asynchronously and writes the data to a buffer, beginning at the specified index.

ReadLine() : string

Reads a line of characters from the text reader and returns the data as a string.

ReadLineAsync() : System.Threading.Tasks.Task<string>

Reads a line of characters asynchronously and returns the data as a string.

ReadToEnd() : string

Reads all characters from the current position to the end of the text reader and returns them as one string.

ReadToEndAsync() : System.Threading.Tasks.Task<string>

Reads all characters from the current position to the end of the text reader asynchronously and returns them as one string.

static
Synchronized(TextReader) : TextReader

Creates a thread-safe wrapper around the specified TextReader.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.IO.TextReader and optionally releases the managed resources.