CodeDomSerializerBase.DeserializeInstance Method
Definition
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.
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.
- 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.