Microsoft® .NET Compact Framework (Core Reference)
by Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton
Summary
In this chapter, you saw how to use classes that derive from Stream to perform byte-level input and output. You saw how to use various Stream-derived classes to read bytes from or write bytes to files, network connections, or memory. Then you saw how the BinaryReader and BinaryWriter classes allow you to view a file not just as raw bytes, but as an image of binary data, with fast read and write features that avoid the overhead of converting data to or from characters.
You also saw how to use the StreamReader and StreamWriter classes to read or write streams as characters. This requires the translation of characters to or from bytes. You saw how the Encoding class provides a mechanism for doing this easily.
Finally you saw how to use the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access