using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class China : Walkable { public void Walk() { Console.WriteLine("人走路"); } } class Dog : Walkable { public void Walk() { Console.WriteLine("狗走路"); } } class Bird : FLyable, Walkable { public void Fly() { Console.WriteLine("飞起来了"); } public void Walk() { Console.WriteLine("鸟在路上走"); } } interface FLyable//接口只能定义能干什么,但是不能定义出来怎么干。 { void Fly(); } interface Walkable { void Walk(); } class Program { static void Main(string[] args) { Bird b = new Bird(); b.Fly(); b.Walk(); China c = new China(); c.Walk(); Dog d = new Dog(); d.Walk(); Console.ReadKey(); } } }