แก้ไข

แชร์ผ่าน


ToolboxItem.Deserialize(SerializationInfo, StreamingContext) Method

Definition

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

protected:
 virtual void Deserialize(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected virtual void Deserialize (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member Deserialize : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.Deserialize : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Protected Overridable Sub Deserialize (info As SerializationInfo, context As StreamingContext)

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.

MyToolboxItem(SerializationInfo info, StreamingContext context)
{
    Deserialize(info, context);
}
Sub New(ByVal info As SerializationInfo, _
    ByVal context As StreamingContext)
    Deserialize(info, context)
End Sub

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