Instantiate the specified type defined in the specified assembly file.
[Visual Basic] Overloads Public Function CreateInstanceFrom( _ ByVal assemblyFile As String, _ ByVal typeName As String _ ) As ObjectHandle [C#] public ObjectHandle CreateInstanceFrom( string assemblyFile, string typeName ); [C++] public: ObjectHandle* CreateInstanceFrom( String* assemblyFile, String* typeName ); [JScript] public function CreateInstanceFrom( assemblyFile : String, typeName : String ) : ObjectHandle;
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.
Exception Type | Condition |
---|---|
ArgumentNullException | if assemblyFile is a null reference (Nothing). |
AppDomain Class | AppDomain Members | System Namespace | AppDomain.CreateInstanceFrom Overload List