Edit

Share via


CodeDomSerializerBase.DeserializeInstance Method

Definition

Returns an instance of the given type.

protected:
 virtual System::Object ^ DeserializeInstance(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, Type ^ type, cli::array <System::Object ^> ^ parameters, System::String ^ name, bool addToContainer);
protected virtual object DeserializeInstance (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, Type type, object[] parameters, string name, bool addToContainer);
protected virtual object DeserializeInstance (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, Type type, object?[]? parameters, string? name, bool addToContainer);
abstract member DeserializeInstance : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * Type * obj[] * string * bool -> obj
override this.DeserializeInstance : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * Type * obj[] * string * bool -> obj
Protected Overridable Function DeserializeInstance (manager As IDesignerSerializationManager, type As Type, parameters As Object(), name As String, addToContainer As Boolean) As Object

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager to use for serialization.

type
Type

The Type of the instance to return.

parameters
Object[]

The parameters to pass to the constructor for type.

name
String

The name of the deserialized object.

addToContainer
Boolean

true to add this object to the design container; otherwise, false. The object must implement IComponent for this to have any effect.

Returns

An instance of type.

Exceptions

manager or type is null.

Remarks

The DeserializeInstance method is invoked during deserialization to obtain an instance of an object. When this is called, an instance of the requested type should be returned. The default implementation invokes the CreateInstance method of the manager parameter.

Applies to

See also