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.
 
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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top