DesignerSerializationManager.IDesignerSerializationManager.CreateInstance 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
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
參數
- type
- Type
要建立的資料型態。
- arguments
- ICollection
將參數傳遞給此型態的建構子。
- name
- String
物件的名稱。 此名稱可用於後續透過 GetInstance(String)存取該物件。 若 null 被傳遞,該物件仍會被建立,但無法以名稱存取。
- addToContainer
- Boolean
true 將此物件加入設計容器。 物件必須實作 IComponent 才能產生效果。
傳回
新建立的物件實例。