'dynamic' class

  • Thread starter Thread starter nieuws
  • Start date Start date
N

nieuws

Hello,
I have a variable containing a classname and want to use that variable to
create an instance of the class. Is that possible? How?
string classvar = "xyz"
object class = new classvar --> creates an instance of class xyz

Thanks in advance

Frank
 
Hi,

Use the Activator.CreateInstance method.

Specifically, the (string, string) overload might be the one you are
searching for.

HTH,
Rakesh Rajan
 
Back
Top