public void Reflect_GetProperty_NoArg_OverriddenVirtualPropertyFromSubSubClass_ReturnsExpectedProperty() { PropertyInfo expected = typeof(SubSubClass).GetProperty(nameof(SubSubClass.VirtualProperty)); SubSubClass cls = new SubSubClass(); PropertyInfo actual = Reflect.GetProperty(() => cls.VirtualProperty); Assert.AreEqual(expected, actual); }
public static void ClassExamples2Func() { // Getting specific with base constructor SubClass sci = new SubClass(1); SubClass scs = new SubClass("test"); scs.MyFunc(); // Getting specific with base constructor SubSubClass ssci = new SubSubClass(1); SubSubClass sscs = new SubSubClass("test"); sscs.MyVirtualFunc(); }
public SubClass(string value) { SubSub = new SubSubClass(value); }