Прочитај на енглеском Уреди

Делите путем


ToolboxItem.Deserialize(SerializationInfo, StreamingContext) Method

Definition

Loads the state of the toolbox item from the specified serialization information object.

C#
protected virtual void Deserialize(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);

Parameters

info
SerializationInfo

The SerializationInfo to load from.

context
StreamingContext

A StreamingContext that indicates the stream characteristics.

Examples

The following code example demonstrates loading the state of the toolbox item from the specified serialization information object. This code example is part of a larger example provided for the ToolboxItem class.

C#
MyToolboxItem(SerializationInfo info, StreamingContext context)
{
    Deserialize(info, context);
}

Notes to Inheritors

The Serialize(SerializationInfo, StreamingContext) and Deserialize(SerializationInfo, StreamingContext) methods must be implemented in classes that derive from ToolboxItem in order to support persistence in the toolbox database provided by some development environments.

Applies to

Производ Верзије
.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
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10