WorkflowMarkupSerializationManager.IDesignerSerializationManager.CreateInstance 方法

定义

创建指定类型的实例并将其添加到命名实例的集合中。

 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

Type 创建的。

arguments
ICollection

一个包含 . ICollection的参数的 。type

name
String

对象的名称。 此名称可用于稍后使用 IDesignerSerializationManager.GetInstance(String). 如果传递 null 引用(),则仍会创建对象,但无法按名称访问。

addToContainer
Boolean

true 将对象添加到设计容器;否则,为 false.

返回

新建的对象。

实现

注解

如果 addToContainer 设置为 true,则对象必须实现 IComponent 此对象才能产生任何效果。

适用于