Create an instance from the class name? 
Author Message
 Create an instance from the class name?

If I have the name of a class in a string, can I create an instance (create an object) using the class name in the string?



Tue, 07 Dec 2004 10:50:26 GMT  
 Create an instance from the class name?

See the Activator.CreateInstance method.

--

*---------={ Fine Art for .NET }=---------*

*-----------------------------------------*

Turn on, tune in, download.



Tue, 07 Dec 2004 12:24:19 GMT  
 Create an instance from the class name?
Thanks, I had a look at it, but the one I was looking for is the
Assembly.CreateInstance



Quote:

> See the Activator.CreateInstance method.

> --

> *---------={ Fine Art for .NET }=---------*

> *-----------------------------------------*

> Turn on, tune in, download.




Tue, 07 Dec 2004 13:02:42 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. instance a class from its class name

2. create instance of a class from a string

3. Using reflection to create class instance

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

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

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

7. Want to create only ONE instance of class

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

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. newbie: private class variables are visible in class instances

 

 
Powered by phpBB® Forum Software