I want to find out if two objects have the same type. I've tried
if TypeOf X = TypeOf Y
and
if TypeOf X is TypeOf Y
but neither of these are valid VB
Is there a way of doing this in one line, or do I just have to make code for each possible type?
if (TypeOf X is Type1 AndAlso TypeOf Y is Type1)
OrElse (TypeOf X is Type2 AndAlso TypeOf Y is Type2)
...