Kiedy jest obj.GetType (). IsInstanceOfType (typeof (MyClass)) true?
Patrzę na ten fragment kodu napisany przez kogoś innego i zastanawiam się, kiedy będzie to prawda. Zasadniczo mówi, że someType jest instancją someOtherType. Czy to ma sens? Do tej pory próbowałem:
derivedClass.GetType().IsInstanceOfType(typeof(BaseClass))
baseClass.GetType().IsInstanceOfType(typeof(DerivedClass))
myClass.GetType().IsInstanceOfType(typeof(MyClass))
Wszystkie z nich są fałszywe.
Każda pomoc jest doceniana.