Table 1: Four attributes and associated methods that correspond to the four stages involved in the serialization/deserialization process implemented in the .NET Framework.

Attribute Method Signature Description
OnDeserializing private void
DeSerializing(StreamingContext context)
This method is called during deserialization of an object.
OnDeserialized private void
DeSerialized(StreamingContext context)
This method is called after deserialization of an object is complete.
OnSerializing private void
Serializing(StreamingContext context)
This method is called during serialization of an object.
OnSerialized private void
Serialized(StreamingContext Context}
This method is called after serialization of an object is complete.