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.CreateInstanceFrom (String, String, Boolean)

Instantiate the specified type defined in the specified assembly file and optionally specifying whether the assembly is to be shared across application domains.

[Visual Basic]
Overloads Public Function CreateInstanceFrom( _
   ByVal assemblyFile As String, _
   ByVal typeName As String, _
   ByVal shared As Boolean _
) As ObjectHandle
[C#]
public ObjectHandle CreateInstanceFrom(
   string assemblyFile,
   string typeName,
   bool shared
);
[C++]
public: ObjectHandle* CreateInstanceFrom(
   String* assemblyFile,
   String* typeName,
   bool shared
);
[JScript]
public function CreateInstanceFrom(
   assemblyFile : String,
   typeName : String,
   shared : Boolean
) : ObjectHandle;

Parameters

assemblyFile
The assembly file name.
typeName
The full name of the type.
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).

Return Value

Returns an ObjectHandle object that is a wrapper for the instantiated object. Returns a null reference (in Visual Basic Nothing) if the type is not found. ObjectHandle needs to be unwrapped to access the real object.

Exceptions

Exception Type Condition
ArgumentNullException if assemblyFile is a null reference (Nothing).

See Also

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