Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

22: File System Data > Serialized Objects

Serialized Objects

Applications, as you have seen, often need to store data on a hard disk. So far in this chapter, you've looked at constructing text and data files piece by piece, but often that isn't the most convenient way of doing things. Sometimes it's better to store data in the form that it is used in, namely objects.

The .NET Framework provides the infrastructure to serialize objects in the System.Runtime .Serialization and System.Runtime.Serialization.Formatters namespaces, with specific classes implementing this infrastructure in namespaces below the latter. There are two implementations available to you in the Framework:

  • System.Runtime.Serialization.Formatters.Binary: This namespace contains the class BinaryFormatter, which is capable of serializing objects into binary data, and vice versa.

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint