Team LiB
Previous Section Next Section

Chapter 7. FILE AND STREAM I/O AND OBJECT PERSISTENCE

IN BRIEF

This chapter explains and demonstrates the proper use of file and stream I/O, as well as the related and equally important topic of object persistence.

  • The first section gives you a basic understanding of file I/O and an introduction to the different Stream classes provided in the .NET Framework.

  • The final section gives you an introduction to object persistence.

WHAT YOU NEED

RECOMMENDED SOFTWARE

.NET Framework

C# .NET environment

RECOMMENDED HARDWARE

.NET-enabled desktop client

SKILLS REQUIRED

C# coding


FILE AND STREAM I/O AND OBJECT PERSISTENCE AT A GLANCE

File and Stream I/O

128

  
 

Understanding File and Stream I/O

129

Using the FileSystemWatcher

138

 

Using Streams: FileStream, MemoryStream, StringReader, and StringWriter

132

  

Object Persistence

142

  
 

Serializing Objects

143

Extending Standard Serialization

149

Summary

152

  

Further Reading

152

  


    Team LiB
    Previous Section Next Section