??????????????C# ???????
???????????????????????????????????? ????????????ó???? ???????????????? ???????????????ó??????????????
???????磺
interface IControl
{
void Paint();
}
interface ISurface
{
void Paint();
}
class SampleClass : IControl?? ISurface
{
// Both ISurface.Paint and IControl.Paint call this method. public void Paint() { }
}
????????? ??????????????в????????? ??????????????????????????????? ??????????????????????????????????? -- ???????????????y????ò??? ?????y???????????????y?????????????????????????????????磺 C# ???????
public class SampleClass : IControl?? ISurface
{
void IControl.Paint()
{
System.Console.WriteLine("IControl.Paint");
}
void ISurface.Paint()
{
System.Console.WriteLine("ISurface.Paint");
}