type info from a non-instantiated class


R

Random

Does anyone here know how to get the type from a variable representing a
non-instantiated class? Something like this....

Dim a As MyClass
Dim t As System.Type = GetType(a)

Interestingly, GetType(MyClass) works just fine, but using a variable in
it's place will not.
 
Ad

Advertisements

Ad

Advertisements

R

Random

Thanks again. The reason this didn't work is because the class was
uninstantiated. GetType() throws an error if you don't actually have an
instance of the class if you're using a variable to represent 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