示例#1
0
        static void Main(string[] args)
        {
            Dog dog = new Dog();

            dog.run();
            dog.eats();
            Lion lion = new Lion();

            lion.eats();
            lion.run();
        }
示例#2
0
        static void Main(string[] args)
        {
            Animal Lion  = new Lion();
            Animal Tiger = new Tiger();

            Tiger.SetMe("tiger", 100);
            Tiger.Show();
            Console.WriteLine();
            Lion.SetMe("Lion", 200);
            Lion.Show();
            Console.ReadKey();
        }
示例#3
0
        static void Main(string[] args)
        {
            Lion lion = new Lion();

            lion.SetWord("Grrrrrr");
            lion.SetName("Lion");
            lion.SetType("Carnivor");
            lion.SetNumberOfClaws(10);
            lion.Describe();
            lion.Talk();

            Console.ReadLine();
        }
示例#4
0
        static void Main(string[] args)
        {
            int number;
            var lion = new Lion('=', 1000);
            var an   = new MyClass();

            lion.Walk();
            lion.Eatmeat();
            lion.Talking();
            lion.Implementment();
            lion.Swim();
            Console.WriteLine(an.ToString());
            string value = Console.ReadLine();

            //   bool checkvalue = int.TryParse(Console.ReadLine());
            if ((value == String.Empty))
            {
                throw new NullReferenceException();
            }

            int numbwe = int.Parse(Console.ReadLine());
        }
示例#5
0
 static void Main(string[] args)
 {
     Feline cFeline = new Feline();
     Dog    cDog    = new Dog();
     Lion   cLion   = new Lion();
 }