Created
March 8, 2010 22:11
-
-
Save migueldeicaza/325845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
interface IExplicit { | |
void M (); | |
} | |
interface IImplicit : IExplicit { | |
} | |
class C1 : IImplicit { | |
public void M () | |
{ | |
Console.WriteLine ("C1.M"); | |
} | |
} | |
class C2 : C1, IImplicit { | |
public void M () | |
{ | |
Console.WriteLine ("C2.M"); | |
} | |
} | |
class F{ | |
static void Main () | |
{ | |
var c = new C2 (); | |
IExplicit ie = c; | |
c.M (); | |
ie.M (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment