public void OverloadsTest() { short x = 42; var derivedClass = new DerivedClass2(); var baseClass = new BaseClass2(); var derivedClassAsBase = derivedClass as BaseClass2; //Assert.IsTrue(derivedClass.Foo(x).StartsWith("??")); //Assert.IsTrue(baseClass.Foo(x).StartsWith("??")); //Assert.IsTrue(derivedClassAsBase.Foo(42).StartsWith("??")); }
private string Test(DerivedClass2 item) => "DerivedClass version";
public void GenericOverloadsTest() { var x = new DerivedClass2(); GenericMethod <DerivedClass2, DerivedClass2>(x, x); }