October 2003
Intermediate to advanced
736 pages
15h 25m
English
Serialization is the ability to read and write an arbitrary object graph (reading is sometimes called deserialization). Before we can talk about serializing objects, we need to talk about where they're going serialized to.
Whenever an object is serialized, it must go somewhere. It may go into memory, a file, a database record, or a socket. Generally, where the data is actually written doesn't matter to the object itself. It needs to store the same data regardless of where it goes. All the object generally cares about is that bytes can be written and read, and sometimes we'd like to skip around among the bytes. To satisfy these desires, .NET provides the abstract base class Stream from the System.IO namespace:
MustInherit Class Stream ...