Home All Groups Group Topic Archive Search About

Instance a class at runtime

Author
23 Feb 2006 5:21 PM
Ernesto Díaz
Hi

I need to instance a class at runtime, at runtime a can get the name in a
string, i would like to know if its possible to instance the class at
runtime with the name in a string.

Thanks for your assistance.

Ernesto Díaz

Author
23 Feb 2006 6:14 PM
Jim Wooley
> I need to instance a class at runtime, at runtime a can get the name
> in a string, i would like to know if its possible to instance the
> class at runtime with the name in a string.

Check out the AppDomain.CreateInstance method.

Jim Wooley
Author
23 Feb 2006 8:47 PM
Cerebrus
Author
24 Feb 2006 12:07 AM
Herfried K. Wagner [MVP]
"Ernesto Díaz" <jed***@vianney.com.mx> schrieb:
> I need to instance a class at runtime, at runtime a can get the name in a
> string, i would like to know if its possible to instance the class at
> runtime with the name in a string.

Check out the snippets at
<URL:http://dotnet.mvps.org/dotnet/code/techniques/#ClassByName>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>