コード例 #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
ファイル: TestAnimal.cs プロジェクト: phong100401/Practice-C-
        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
ファイル: Program.cs プロジェクト: sldghamr/AlgorithmProjects
        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();
 }