편집

다음을 통해 공유


ActivityCodeDomSerializationManager.CreateInstance Method

Definition

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

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

Parameters

type
Type

The data Type to create.

arguments
ICollection

An ICollection of arguments to pass to the constructor for the specified type.

name
String

The name assigned to the resulting object. This name can be used to access the object later through GetInstance(String).

If null is passed, the object is created but cannot be accessed by name.

addToContainer
Boolean

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

The object must implement IComponent for this to have any effect.

Returns

The newly created object instance.

Implements

Remarks

This provides an indirect reference to the SerializationManager method of the same name.

Applies to