Is there a better way to do this, where C:B:A:

Code:
if (X.GetType().IsSubclassOf(typeof(A)) ||
    X.GetType() == typeof(A))
{
     A bob = (A)X;
}
The problem with IsSubclassOf() is that if the type is A, it returns false.