WorkflowMarkupSerializationManager.IDesignerSerializationManager.CreateInstance Method (Type, ICollection, String, Boolean)


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

Namespace:   System.Workflow.ComponentModel.Serialization
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

object IDesignerSerializationManager.CreateInstance(
	Type type,
	ICollection arguments,
	string name,
	bool addToContainer


Type: System.Type

The Type to create.

Type: System.Collections.ICollection

An ICollection that contains the arguments for type.

Type: System.String

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

Type: System.Boolean

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

Return Value

Type: System.Object

The newly created object.

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

.NET Framework
Available since 3.0
Return to top