ActivityCodeDomSerializationManager.CreateInstance 方法

定義

建立指定型態的實例,並將其加入一組命名實例中。

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

參數

type
Type

要創造的數據 Type

arguments
ICollection

ICollection一組參數,將傳給指定型別的建構子。

name
String

賦予所得物件的名稱。 此名稱可用於後續透過 GetInstance(String)存取該物件。

若傳遞 null,物件會被建立,但無法以名稱存取。

addToContainer
Boolean

true將物件加入設計容器;否則,。 false

物件必須實作 IComponent 才能產生效果。

傳回

新建立的物件實例。

實作

備註

這間接指向 SerializationManager 同名方法。

適用於