抽象类继承非抽象类的使用


//抽象类继承非抽象类的使用
abstract class CloseForm : Manager
        {

            public abstract void Display();
            public abstract void ShowMessageBox();
            public void OutPutDatas()
            {

            }
                
        }
   
    class GateHome:CloseForm
    {

        public override void Display()
        {
            Console.WriteLine("Display CloseForm");
        }

        public override void ShowMessageBox()
        {
            Console.WriteLine("Display ShowMessageBox");
        }
    }
       

        class Manager:Person
        {
            public int tatal { get; set; }
            public Manager()
            {

            }
            public Manager(string s,int n,int m)
            {
                this.tatal = n;
            }
        }

     
   
        static void Main(string[] args)
        {
            CloseForm closeform = new GateHome();
            closeform.Display();//输出Display CloseForm
            closeform.ShowMessageBox();//输出Display ShowMessageBox
          
            Console.Read();
         
        }
    }

posted @ 2013-04-15 09:04  Predator  阅读(392)  评论(0编辑  收藏  举报