Επεξεργασία

Κοινή χρήση μέσω


WorkflowMarkupSerializationManager.IDesignerSerializationManager.CreateInstance Method

Definition

Creates an instance of the specified type and adds it to a collection of named instances.

 virtual System::Object ^ System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type ^ type, System::Collections::ICollection ^ arguments, System::String ^ name, bool addToContainer) = System::ComponentModel::Design::Serialization::IDesignerSerializationManager::CreateInstance;
object IDesignerSerializationManager.CreateInstance (Type type, System.Collections.ICollection arguments, string name, bool addToContainer);
abstract member System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance : Type * System.Collections.ICollection * string * bool -> obj
override this.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance : Type * System.Collections.ICollection * string * bool -> obj
Function CreateInstance (type As Type, arguments As ICollection, name As String, addToContainer As Boolean) As Object Implements IDesignerSerializationManager.CreateInstance

Parameters

type
Type

The Type to create.

arguments
ICollection

An ICollection that contains the arguments for type.

name
String

The name of the object. This name can be used to access the object later using IDesignerSerializationManager.GetInstance(String). If a null reference (Nothing in Visual Basic) is passed, the object is still created but cannot be accessed by name.

addToContainer
Boolean

true to add the object to the design container; otherwise, false.

Returns

The newly created object.

Implements

Remarks

If addToContainer is set to true, the object must implement IComponent for this to have any effect.

Applies to