CodeDomSerializerBase.DeserializeInstance Method (IDesignerSerializationManager, Type, Object[], String, Boolean)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns an instance of the given type.

Namespace:   System.ComponentModel.Design.Serialization
Assembly:  System.Design (in System.Design.dll)

protected virtual object DeserializeInstance(
	IDesignerSerializationManager manager,
	Type type,
	object[] parameters,
	string name,
	bool addToContainer
)

Parameters

manager
Type: System.ComponentModel.Design.Serialization.IDesignerSerializationManager

The IDesignerSerializationManager to use for serialization.

type
Type: System.Type

The Type of the instance to return.

parameters
Type: System.Object[]

The parameters to pass to the constructor for type.

name
Type: System.String

The name of the deserialized object.

addToContainer
Type: System.Boolean

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

Return Value

Type: System.Object

An instance of type.

Exception Condition
ArgumentNullException

manager or type is null.

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.

.NET Framework
Available since 2.0
Return to top
Show: