标签:
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();
}
}
标签:
原文地址:http://www.cnblogs.com/bisu/p/4424940.html