SerializationInfo Class

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

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

No code example is currently available or this language may not be supported.
/** @attribute ComVisibleAttribute(true) */ 
public final class SerializationInfo
ComVisibleAttribute(true) 
public final class SerializationInfo
Not applicable.

This class is used by objects with custom serialization behavior. The GetObjectData method on either ISerializable or ISerializationSurrogate populates the 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 SerializationInfo store at serialization time using the AddValue methods and extracted from the SerializationInfo store at deserialization using the GetValue methods.

For more information about customizing serialization, see Custom Serialization.

The following code example demonstrates the SerializationInfo for custom serialization and deserialization of various values.

No code example is currently available or this language may not be supported.

System.Object
  System.Runtime.Serialization.SerializationInfo

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: