See Also: SerializableAttribute Members
Apply the SerializableAttribute attribute to a type to indicate that instances of this type can be serialized. The common language runtime throws System.Runtime.Serialization.SerializationException if any type in the graph of objects being serialized does not have the SerializableAttribute attribute applied.
When you apply the SerializableAttribute attribute to a type, all private and public fields are serialized by default. You can control serialization more granularly by implementing the System.Runtime.Serialization.ISerializable interface to override the serialization process.
Or you can exclude fields from serialization by applying the NonSerializedAttribute attribute to the field. If a field of a serializable type contains a pointer, a handle, or some other data structure that is specific to a particular environment, and cannot be meaningfully reconstituted in a different environment, then you might want to apply the NonSerializedAttribute attribute to that field.