???????? IControl.Paint ?????? IControl ??????? ISurface.Paint ?????? ISurface ??á???????????????????????????????????????á?
???????磺
SampleClass obj = new SampleClass();
//obj.Paint();
// Compiler error. IControl c = (IControl)obj; c.Paint();
// Calls IControl.Paint on SampleClass. ISurface s = (ISurface)obj; s.Paint();
// Calls ISurface.Paint on SampleClass.
????????????????????????????????????????????????????????????????????
interface ILeft
{
int P { get;}
}
interface IRight
{
int P();
}
?????????????????????????????? P ??/???? P ??????????????????????? ???磺
class Middle : ILeft?? IRight
{
public int P()
{
return 0;
}
int ILeft.P
{
get { return 0;
}
}
}