接口规则
using System;
using System.Linq;
using System.Runtime.InteropServices;
namespace ConTest
{
class Program
{
static void Main(string[] args)
{
Implement im = new Implement();
im.IAnimalEat();
im.IAnimalWalk();
im.IManagerSleep();
im.IPeopleShow();
Console.Read();
}
}
interface IAnimal
{
void IAnimalWalk();
void IAnimalEat();
}
interface IPeople : IAnimal
{
void IPeopleShow();
}
interface IManager : IPeople, IAnimal
{
void IManagerSleep();
}
class Implement : IManager, IPeople, IAnimal
{
public void IManagerSleep()
{
Console.WriteLine("IManagerSleep");
}
public void IPeopleShow()
{
Console.WriteLine("IPeopleShow");
}
public void IAnimalWalk()
{
Console.WriteLine("IAnimalWalk");
}
public void IAnimalEat()
{
Console.WriteLine("IAnimalEat");
}
}
}