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

The examples illustrate character encoding, and writing values of simple types

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/write-prog.csWriting a text string using three different encodings with StreamWriters. This program is explained


/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-write-simple-non-simple-types/write-prog.csWriting values of simple types and objects of our own classes. This program is explained

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-write-simple-non-simple-types/simple-types.txtThe file simple-types.txt.

/user/normark/oop-csharp-1/sources/c-sharp/io/text-writer-reader/read-write-simple-non-simple-types/non-simple-types.txtThe file non-simple-types.txt.

Go to exerciseDie tossing - writing to text file

Use a TextWriter subclass, rather than a Stream subclass, to write text files