System.Runtime.Serialization.SerializationInfo Class

Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.

See Also: SerializationInfo Members


public sealed class SerializationInfo


This class is used by objects with custom serialization behavior. The ISerializable.GetObjectData(SerializationInfo, StreamingContext) method on either System.Runtime.Serialization.ISerializable or System.Runtime.Serialization.ISerializationSurrogate populates the System.Runtime.Serialization.SerializationInfo store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information.

Objects are added to the System.Runtime.Serialization.SerializationInfo store at serialization time using the SerializationInfo.AddValue(string, object, Type) methods and extracted from the System.Runtime.Serialization.SerializationInfo store at deserialization using the SerializationInfo.GetValue(string, Type) methods.

For more information about customizing serialization, see [<topic://cpconCustomSerialization>].


Namespace: System.Runtime.Serialization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,