_bisu

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

class Program
{
static void Main(string[] args)
{
//解决方法重名的问题

ISayable i = new Person();
i.Say();
Person p = new Person();
p.Say();
Console.ReadKey();

}

public class Person : ISayable
{
public void Say()
{
Console.Write("Person Say HI");
}

void ISayable.Say()
{
Console.Write("ISayable Say Hi");
}

}


public interface ISayable
{
void Say();
}
}

posted on 2015-04-14 15:01  _bisu  阅读(139)  评论(0)    收藏  举报