How do I solve this, without parametrizing class. class Base { void foo () { I want get somehow to type *Derived2* at CT } } class Derived1 : Base { } class Derived2 : Base { }