type info from a non-instantiated class

  • Thread starter Thread starter Random
  • Start date Start date
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.
 
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.
 
Back
Top