ActivityCodeDomSerializationManager.CreateInstance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
.NET