CreateInstance Method (String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)

_AppDomain.CreateInstance Method (String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

ObjectHandle CreateInstance(
	string assemblyName,
	string typeName,
	bool ignoreCase,
	BindingFlags bindingAttr,
	Binder binder,
	object[] args,
	CultureInfo culture,
	object[] activationAttributes,
	Evidence securityAttributes


Type: System.String

The display name of the assembly. See Assembly.FullName.

Type: System.String

The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the Type.FullName property.

Type: System.Boolean

A Boolean value specifying whether to perform a case-sensitive search or not.

Type: System.Reflection.BindingFlags

A combination of zero or more bit flags that affect the search for the typeName constructor. If bindingAttr is zero, a case-sensitive search for public constructors is conducted.

Type: System.Reflection.Binder

An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects using reflection. If binder is null, the default binder is used.

Type: System.Object[]

The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the default constructor is preferred, args must be an empty array or null.

Type: System.Globalization.CultureInfo

Culture-specific information that governs the coercion of args to the formal types declared for the typeName constructor. If culture is null, the CultureInfo for the current thread is used.

Type: System.Object[]

An array of one or more attributes that can participate in activation. Typically, an array that contains a single UrlAttribute object. The UrlAttribute specifies the URL that is required to activate a remote object.

Type: System.Security.Policy.Evidence

Information used to authorize creation of typeName.

Return Value

Type: System.Runtime.Remoting.ObjectHandle

An object that is a wrapper for the new instance specified by typeName. The return value needs to be unwrapped to access the real object.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft