BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.MarshalByRefObject System.IDisposable System.Runtime.InteropServices.ComVisible(true)

is the abstract base class of and , which read characters from streams and strings, respectively. Use these derived classes to open a text file for reading a specified range of characters, or to create a reader based on an existing stream.

Represents a reader that can read a sequential series of characters.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0

  Use this constructor for derived classes.

  Initializes a new instance of the class.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  This implementation of Close calls the method and passes it a true value.

  Flushing the text reader will not flush its underlying encoder unless you explicitly call Close. Setting the property to true means that data will be flushed from the buffer to the stream, but the encoder state will not be flushed. This allows the encoder to keep its state (partial characters) so that it can encode the next block of characters correctly. This scenario affects UTF8 and UTF7 where certain characters can be encoded only after the encoder receives the adjacent character or characters.

  In derived classes, do not override the method. Instead, override the method to add code for releasing resources.

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

  0
- Method
  2.0.0.0
  4.0.0.0
  System.Void

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying.

  For more information, see [<topic://cpconCleaningUpUnmanagedResources>] and Implementing a Dispose Method.

  Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method.

  Releases all resources used by the object.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

  This method is called by the public Dispose method and the method. By default, this method specifies the parameter as true. specifies the parameter as false.

  When the parameter is true, this method releases all resources held by any managed objects that this references. This method invokes the Dispose method of each referenced object.

  Releases the unmanaged resources used by the and optionally releases the managed resources.

  true to release both managed and unmanaged resources; false to release only unmanaged resources. 0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextReader null

  Reading from the text reader is similar to reading from the end of a stream:

  The and methods return -1.

  The method returns zero.

  The method returns null.

  The method returns an empty string.

  Provides a TextReader with no data to read from.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 An I/O error has occurred.

  The method returns an integer value in order to determine whether the end of the file, or another error has occurred. This allows a user to first check if the returned value is -1 before casting it to a type.

  The current position of the is not changed by this operation. The returned value is -1 if no more characters are available. The default implementation returns -1.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

  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.

  An integer representing the next character to be read, or -1 if no more characters are available or the reader does not support seeking.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 An I/O error occurred.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

  The next character from the text reader, or -1 if no more characters are available. The default implementation returns -1.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` is . ( + ) > Length.

  0

  or-

  0.

  An I/O error occurred.

  This method returns after either characters are read or the end of the file is reached. is a blocking version of this method.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

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

  When this method returns, contains the specified character array with the values between and ( + - 1) replaced by the characters read from the current source. The position in at which to begin writing. The maximum number of characters to read. If the end of the reader is reached before the specified number of characters is read into the buffer, the method returns. 0
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Int32> `` `` ``

  The task completes after either the number of characters specified by the parameter are read or the end of the file is reached.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

  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.

  A task that represents the asynchronous read operation. The value of the parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the text has been reached.

  When this method returns, contains the specified character array with the values between and ( + - 1) replaced by the characters read from the current source. The position in at which to begin writing. The maximum number of characters to read. If the end of the text is reached before the specified number of characters is read into the buffer, the current method returns.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` `` `` is . ( + - 1) > Length.

  0

  or-

  0.

  An I/O error occurred.

  The position of the underlying text reader is advanced by the number of characters that were read into .

  The method blocks until either characters are read, or all characters have been read. This is a blocking version of .

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

  The number of characters that have been read. The number will be less than or equal to , depending on whether all input characters have been read.

  When this method returns, this parameter contains the specified character array with the values between and ( + -1) replaced by the characters read from the current source. The position in at which to begin writing. The maximum number of characters to read. 0
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Int32> `` `` ``

  The task does not complete until either the number of characters specified by the parameter are read, or the end of the text has been reached.

  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.

  A task that represents the asynchronous read operation. The value of the parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the text has been reached.

  When this method returns, contains the specified character array with the values between and ( + - 1) replaced by the characters read from the current source. The position in at which to begin writing. The maximum number of characters to read. If the end of the text is reached before the specified number of characters is read into the buffer, the current method returns.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String An I/O error occurred.

  There is insufficient memory to allocate a buffer for the returned string.

  The number of characters in the next line is larger than .

  A line is defined as a sequence of characters followed by a carriage return (0x000d), a line feed (0x000a), a carriage return followed by a line feed, , or the end-of-stream marker. The string that is returned does not contain the terminating carriage return or line feed. The return value is null if the end of the input stream has been reached.

  If the method throws an exception, the reader's position in the underlying is advanced by the number of characters the method was able to read, but the characters that were already read into the internal buffer are discarded. Because the position of the reader in the stream cannot be changed, the characters that were already read are unrecoverable and can be accessed only by reinitializing the object. If the initial position within the stream is unknown or the stream does not support seeking, the underlying also needs to be reinitialized.

  To avoid such a situation and produce robust code you should use the method and store the read characters in a preallocated buffer.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

  The next line from the reader, or null if all characters have been read.

  0
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.String>

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

  A task that represents the asynchronous read operation. The value of the parameter contains the next line from the text reader, or is null if all of the characters have been read.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String An I/O error occurred. There is insufficient memory to allocate a buffer for the returned string. The number of characters from the current position to the end of the underlying stream is larger than .

  If the method throws an exception, the reader's position in the underlying is advanced by the number of characters the method was able to read, but the characters that were already read into the internal buffer are discarded. Because the position of the reader in the stream cannot be changed, the characters that were already read are unrecoverable and can be accessed only by reinitializing the . If the initial position within the stream is unknown or the stream does not support seeking, the underlying also needs to be reinitialized.

  To avoid such a situation and produce robust code you should use the method and store the read characters in a preallocated buffer.

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

  A string that contains all characters from the current position to the end of the text reader.

  0
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.String>

  The class is an abstract class. Therefore, you do not instantiate it in your code. For an example of using the method, see the method.

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

  A task that represents the asynchronous read operation. The value of the parameter contains a string with the characters from the current position to the end of the text reader.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.TextReader `` The parameter is .

  The current method returns a class that wraps around the specified instance and restricts access to it by multiple threads. All reads from the returned wrapper will be thread safe.

  Creates a thread-safe wrapper around the specified TextReader.

  A thread-safe .

  The TextReader to synchronize. 0
- Method
  System.Void

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  1.0.5000.0
0