接口规则

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");
           
        }
    }
}

posted @ 2013-04-28 18:57  Predator  阅读(139)  评论(0编辑  收藏  举报