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 and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 18 : 40
Object-oriented Programming in C#
Input and Output Classes
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

 

/user/normark/oop-csharp-1/sources/c-sharp/io/binary-writer-reader/write-prog.csUse of a BinaryWriter to write some values of simple types.


/user/normark/oop-csharp-1/sources/c-sharp/io/binary-writer-reader/write-outputOutput from the BinaryWriter program - shows size of output file.


 

Go to exerciseDie tossing - writing to a binary file