Lecture overview -- Keyboard shortcut: 'u'  Previous page: StreamReader Examples -- Keyboard shortcut: 'p'  Next page: The class BinaryWriter -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 17 : 40
Object-oriented Programming in C#
Input and Output Classes
Members in class StreamReader

  • 10 StreamReader constructors

    • Similar to the StreamWriter constructors

    • StreamReader(String)

    • StreamReader(Stream)

    • StreamReader(Stream, bool)

    • StreamReader(Stream, Encoding)

    • others

  • int Read()     Reads a single character. Returns -1 if at end of file

  • int Read(char[], int, int)     Returns the number of characters read

  • int Peek()

  • String ReadLine()

  • String ReadToEnd()

  • CurrentEncoding

    • A property that gets the encoding of this StreamReader