Objects controlling their own serialization can do so by implementing the ISerializable interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail.

Notes to Implementers

All formatters must implement this interface. Use Serialize to serialize an object or graph of objects. Use Deserialize to deserialize a stream and create a clone of the original object or graph of objects.