IControl { Paint(); } ISurface { Paint(); } SampleClass : IControl, ISurface { Paint() { } }
SampleClass : IControl, ISurface { IControl.Paint() { System.Console.WriteLine(); } ISurface.Paint() { System.Console.WriteLine(); } }
SampleClass(); IControl c = (IControl)obj; c.Paint(); ISurface s = (ISurface)obj; s.Paint();
ILeft { P { ;} } IRight { P(); }
Middle : ILeft, IRight { P() { 0; } ILeft.P { { 0; } } }