There's two ways: static if(is(One == Two)) {
}That compares the static types in a form of conditional compilation. http://dlang.org/expression.html#IsExpression
If you want to compare the runtime type of a class object, you can do:
if(typeid(obj_one) == typeid(obj_two)) that should tell you if they are the same dynamic class type.