I've got a mustinherit class with two subclasses.
Lets say the class is "Shape" and the subclasses are "Circle" and "Triangle"

Now I've got an array of shapes containing both circles and triangles.
How can I check which type the item is?

I noticed that this doesn't work:

VB Code:
  1. if array(i).getType.equals(Shape) then
  2. end if

But this does:
VB Code:
  1. dim s as Shape
  2. ...
  3. if array(i).getType.equals(s.getType) then
  4. end if

It seems stupid to me that I should create a variable of the type, so isn't there a better way?