SerializationInfo Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
public ref class SerializationInfo sealed
public sealed class SerializationInfo
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SerializationInfo
type SerializationInfo = class
[<System.Runtime.InteropServices.ComVisible(true)>]
type SerializationInfo = class
Public NotInheritable Class SerializationInfo
- Inheritance
-
SerializationInfo
- Attributes
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.
Serialization |
Obsolete.
Initializes a new instance of the SerializationInfo class. |
Serialization |
Obsolete.
Creates a new instance of the SerializationInfo class. |
Assembly |
Gets or sets the assembly name of the type to serialize during serialization only. |
Full |
Gets or sets the full name of the Type to serialize. |
Is |
Gets whether the assembly name has been explicitly set. |
Is |
Gets whether the full type name has been explicitly set. |
Member |
Gets the number of members that have been added to the SerializationInfo store. |
Object |
Returns the type of the object to be serialized. |
Add |
Adds a Boolean value into the SerializationInfo store. |
Add |
Adds an 8-bit unsigned integer value into the SerializationInfo store. |
Add |
Adds a Unicode character value into the SerializationInfo store. |
Add |
Adds a DateTime value into the SerializationInfo store. |
Add |
Adds a decimal value into the SerializationInfo store. |
Add |
Adds a double-precision floating-point value into the SerializationInfo store. |
Add |
Adds a 16-bit signed integer value into the SerializationInfo store. |
Add |
Adds a 32-bit signed integer value into the SerializationInfo store. |
Add |
Adds a 64-bit signed integer value into the SerializationInfo store. |
Add |
Adds a value into the SerializationInfo store, where |
Add |
Adds the specified object into the SerializationInfo store, where it is associated with a specified name. |
Add |
Adds an 8-bit signed integer value into the SerializationInfo store. |
Add |
Adds a single-precision floating-point value into the SerializationInfo store. |
Add |
Adds a 16-bit unsigned integer value into the SerializationInfo store. |
Add |
Adds a 32-bit unsigned integer value into the SerializationInfo store. |
Add |
Adds a 64-bit unsigned integer value into the SerializationInfo store. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Retrieves a Boolean value from the SerializationInfo store. |
Get |
Retrieves an 8-bit unsigned integer value from the SerializationInfo store. |
Get |
Retrieves a Unicode character value from the SerializationInfo store. |
Get |
Retrieves a DateTime value from the SerializationInfo store. |
Get |
Retrieves a decimal value from the SerializationInfo store. |
Get |
Retrieves a double-precision floating-point value from the SerializationInfo store. |
Get |
Returns a SerializationInfoEnumerator used to iterate through the name-value pairs in the SerializationInfo store. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Retrieves a 16-bit signed integer value from the SerializationInfo store. |
Get |
Retrieves a 32-bit signed integer value from the SerializationInfo store. |
Get |
Retrieves a 64-bit signed integer value from the SerializationInfo store. |
Get |
Retrieves an 8-bit signed integer value from the SerializationInfo store. |
Get |
Retrieves a single-precision floating-point value from the SerializationInfo store. |
Get |
Retrieves a String value from the SerializationInfo store. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Get |
Retrieves a 16-bit unsigned integer value from the SerializationInfo store. |
Get |
Retrieves a 32-bit unsigned integer value from the SerializationInfo store. |
Get |
Retrieves a 64-bit unsigned integer value from the SerializationInfo store. |
Get |
Retrieves a value from the SerializationInfo store. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Set |
Sets the Type of the object to serialize. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: