There is any way to determine if an object is exactly a class and not a derived one of that?
For instance:
class A : X { }
class B : A { }
I can do something like this:
bool isExactlyA(X obj)
{
return (obj is A) && !(obj is B);
}
Of course if there are more derived classes of A
I'd have to add and conditions.