Free mag vol1 | Page 850

CHAPTER 20  FILE I/O AND OBJECT SERIALIZATION • If the object does not implement ISerializable, the default serialization process is used, serializing all fields not marked as [NonSerialized]. In addition to determining whether the type supports ISerializable, formatters are also responsible for discovering whether the types in question support members that have been adorned with the [OnSerializing], [OnSerialized], [OnDeserializing], or [OnDeserialized] attributes. You’ll examine the role of these attributes in mometarily, but first you need to look at the role of ISerializable. Customizing Serialization Using ISerializable Objects that are marked [Serializable] have H