Murach's C# - How to work with text and binary files

Although databases are commonly used in C# applications, you may also need to access data that's stored in a text file or a binary file. So this chapter shows you how to use the Directory, File, and FileStream classes to work with files; how to use the StreamWriter and StreamReader classes to write and read text files; and how to use the BinaryWriter and BinaryReader classes to write and read binary files.

Chapter 21 How to work with text and binary files
An introduction to the System.IO classes 656
The classes for managing directories, files, and paths 656
How files and streams work 658
How to use the FileStream class 660
How to use the exception classes for file I/O 662
How to work with text files 664
How to write a text file 664
How to read a text file 666
A class that works with a text file 668
How to work with binary files 670
How to write a binary file 670
How to read a binary file 672
A class that works with a binary file 674




Murach's C#

Learn more about this book

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.