Lecture overview -- Keyboard shortcut: 'u'  Previous page: The class TextReader -- Keyboard shortcut: 'p'  Next page: Members in class StreamReader -- 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 16 : 40
Object-oriented Programming in C#
Input and Output Classes
StreamReader Examples

The examples illustrate encodings and reading values of simple types

 

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-prog.csReading back the text strings encoded in three different ways, with StreamReader.

In the last half part of the program, the binary contents of the three files are read and reported.

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/outputOutput from the program that reads back the strings encoded in three different ways.


 

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-write-simple-non-simple-types/read-prog.csA program that reads line of text and parses them to values of simple types.


/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-write-simple-non-simple-types/read-prog-outputOutput from the readline and parsing program.


Use a TextReader subclass, rather than a Stream subclass, to read text files