Instance a class at runtime

E

Ernesto Díaz

Hi

I need to instance a class at runtime, at runtime I 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
 
S

Stoitcho Goutsev \(100\)

Ernesto,
You can use the Activator.CreateInstance or you can use reflection the get
the constructor and invoke it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top