TextReader Class
NuGet: GHIElectronics.TinyCLR.IO
Assembly: GHIElectronics.TinyCLR.IO
Namespace: System.IO
Base class for reading a sequential series of characters.
public abstract class TextReader : MarshalByRefObject, IDisposable
Constructors
TextReader()
protected TextReader()
Initializes the reader.
Methods
Close()
public virtual void Close()
Closes the reader and releases its resources.
Dispose()
public void Dispose()
Releases the resources used by the reader.
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Releases the resources used by the reader.
Peek()
public virtual int Peek()
Returns the next character without consuming it, or -1 at end of stream.
Returns int
Read()
public virtual int Read()
Reads and consumes the next character, or returns -1 at end of stream.
Returns int
Read(char[] buffer, int index, int count)
public virtual int Read(char[] buffer, int index, int count)
Reads up to count characters into the buffer, returning the number read.
Returns int
ReadBlock(char[] buffer, int index, int count)
public virtual int ReadBlock(char[] buffer, int index, int count)
Reads count characters into the buffer, blocking until they are available or the stream ends.
Returns int
ReadToEnd()
public virtual string ReadToEnd()
Reads all remaining characters and returns them as a string.
Returns string
ReadLine()
public virtual string ReadLine()
Reads a line of characters and returns it, or null at end of stream.
Returns string