Using reflection to create class instance 
Author Message
 Using reflection to create class instance

Hi,

Using reflection APIs I want to create an instance of
class. I will receive a namespace and a class whose object
needs to be created. This namespace will not be a current
one. I am able to do this if I receive the complete
assembly path.

Please let me know if it is possible with just namespace
and class name. I also tried registering it with GAC but
no luck.

Thanks in advance,

Sanjay Kedare



Mon, 27 Sep 2004 22:15:56 GMT  
 Using reflection to create class instance
Have a look at Assembly.LoadFrom and related Assembly members on reflection
namespace.
You'll find what you need.

HTH
Corrado



Tue, 28 Sep 2004 00:09:11 GMT  
 Using reflection to create class instance
I had the same problem. I was not able to get it to run from the GAC, only
with a dll path. If you figure it out, please post here. Thanks.


Quote:
> Have a look at Assembly.LoadFrom and related Assembly members on
reflection
> namespace.
> You'll find what you need.

> HTH
> Corrado



Tue, 28 Sep 2004 02:13:14 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dinamically creating instance of object..reflection.

2. Using New to create instances of a class in MTS componant

3. Using New to create instances of a class in MTS componant

4. create instance of a class from a string

5. Create an instance from the class name?

6. Creating a new instance of Winsock in a Class Module

7. ASP - create in just script instance of class provided in current page with different language

8. Want to create only ONE instance of class

9. Create Instance of class in running activeX.exe??

10. Create an instance of a Timer obeject in a class

11. dynamically creating instances of classes

12. Reflection Question How to Call a Methode of a Member without Createing a new instance

 

 
Powered by phpBB® Forum Software