TypeOf with Generics
Before generics I could use (TypeOf myObject Is MyClass) or (TypeOf myObject Is IMyInterface) to determine whether an object is a certain class or interface type. But, now if myObject is a generic then that technique does not work because the generic could be a structure. So, I'm searching for the best (i.e., fastest) way to perform the above tests when using generics. Using (TypeOf CObj(myObject) Is MyClass) is the first thing that comes to mind, but is there a better way? For example, is it possible to specify that a generic is a reference type?
Thanks for any help.
Lance