NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

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

Instantiate the specified type defined in the specified assembly with the supplied arguments to the type constructor, optionally ignoring the case of the assembly name and the type name, using the specified binder and binding flags. Optionally, the loaded assembly can be shared across application domains. A set of activation attributes can be supplied and evidence can be supplied.

[Visual Basic]
Overloads Public Function CreateInstance( _
   ByVal assemblyName As String, _
   ByVal typeName As String, _
   ByVal ignoreCase As Boolean, _
   ByVal bindingAttr As BindingFlags, _
   ByVal binder As Binder, _
   ByVal args() As Object, _
   ByVal culture As CultureInfo, _
   ByVal shared As Boolean, _
   ByVal activationAttributes() As Object, _
   ByVal securityAttributes As Evidence _
) As ObjectHandle
[C#]
public ObjectHandle CreateInstance(
   string assemblyName,
   string typeName,
   bool ignoreCase,
   BindingFlags bindingAttr,
   Binder binder,
   object[] args,
   CultureInfo culture,
   bool shared,
   object[] activationAttributes,
   Evidence securityAttributes
);
[C++]
public: ObjectHandle* CreateInstance(
   String* assemblyName,
   String* typeName,
   bool ignoreCase,
   BindingFlags bindingAttr,
   Binder* binder,
   Object* args[],
   CultureInfo* culture,
   bool shared,
   Object* activationAttributes[],
   Evidence* securityAttributes
);
[JScript]
public function CreateInstance(
   assemblyName : String,
   typeName : String,
   ignoreCase : Boolean,
   bindingAttr : BindingFlags,
   binder : Binder,
   args : Object[],
   culture : CultureInfo,
   shared : Boolean,
   activationAttributes : Object[],
   securityAttributes : Evidence
) : ObjectHandle;

Parameters

assemblyName
The display name of the assembly. See the description of AssemblyName for the format of the display name. If a null reference (in Visual Basic Nothing), the executing assembly is assumed.
typeName
The full name of the Type.
ignoreCase
If true, the case of the supplied names, assemblyName and typeName, is ignored.
bindingAttr
This bit mask affects the way in which the search is conducted. The value is a combination of zero or more bit flags from BindingFlags such as NonPublic. This can be set to 0 to conduct a case-sensitive search for public properties.
binder
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If binder is a null reference (Nothing), the default binder is used. See Binder.
args
The arguments to be passed to the constructor. This array or arguments must match in number, order, and type, the parameters of the constructor to be invoked. If the constructor that takes no parameters is desired, args must be an empty array or a a null reference (Nothing) reference.
culture
An instance of CultureInfo used to govern the coercion of types. If this is a null reference (Nothing), the CultureInfo for the current thread is used. (Note that this is necessary to, for example, convert a String that represents 1000 to a Double value, since 1000 is represented differently by different cultures.)
shared
If true, the assembly is loaded in a form where its JIT-compiled code can be reused by multiple application domains (at a slight cost in code quality).
activationAttributes
One or more activation attributes that can participate in the activation. An example of an activation attribute is:
securityAttributes
[To be supplied.]

See Also

AppDomain Class | AppDomain Members | System Namespace | AppDomain.CreateInstance Overload List