Lecture overview -- Keyboard shortcut: 'u'  Previous page: Members in class StreamReader -- Keyboard shortcut: 'p'  Next page: BinaryWriter Members -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Input and Output Classes - slide 18 : 40

The class BinaryWriter

Class BinaryWriter allows us to write values of simple types in binary format

Encodings are only relevant if values of type char are written

write-prog.cs
Use of a BinaryWriter to write some values of simple types.
write-output
Output from the BinaryWriter program - shows size of output file.
Go to exercise
Die tossing - writing to a binary file