how to: instantiate object if only its name (e.g. "foo") is known

  • Thread starter Thread starter TR
  • Start date Start date
T

TR

At runtime, I'd like to instantiate an object (e.g. myInvoice) when all I
know is the name of the class that has to instantiated (e.g. "Invoice").

Dim DesiredClass as String = "Invoice"
'// now create an instance of the desired class
???

Can this be done?

I hope the question is clear.
Thanks
TR
 

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

Back
Top