public new string Method()
class DerivedWithInterface : Base, IInterface
public new string Method()
return "DerivedWithInterface";
class BaseExplicit : IInterface
string IInterface.Method()
class DerivedFromExplicit : BaseExplicit
return "DerivedFromExplicit";
class DerivedWithInterfaceFromExplicit : BaseExplicit, IInterface
return "DerivedWithInterfaceFromExplicit";
static void Test(IInterface iface)
Console.WriteLine("{0}: {1}", iface.ToString(), iface.Method());
public static void Main()
Test(new DerivedWithInterface());
Test(new DerivedFromExplicit());
Test(new DerivedWithInterfaceFromExplicit());