??????????????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");
}