Instantiate a class from a variable's contents

  • Thread starter Thread starter Dean Slindee
  • Start date Start date
D

Dean Slindee

If a string variable contains a value that is the name of a class, is there
any way to instantiate the class from the contents?
Example:
Dim strClassName as String = "Foo"
Dim cls as New strClassName

Thanks,
Dean Slindee
 

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