コード例 #1
0
        static void Main(string[] args)
        {
            Dogs dog = new Dogs();

            dog.Lay();
            dog.SayHi();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            // Student stu = new Student();
            // stu.printStudentName();
            // stu.doSomething();

            // IStudent muiz = new Student();
            // muiz.printName();

            // IStudent IStud = new Student();
            // IStud.printName();

            //for Abstract examples, create an instance of derived class and point to base class as a reference variable
            // Student student = new StudentA();
            // student.printFullName();

            // student.doSomething();

            Dogs dog = new Dogs();

            dog.dogs();

            Cats cat = new Cats();

            cat.cats();
        }
コード例 #3
0
        private static void Main(string[] args)
        {
            Dogs dog = new Dogs();

            dog.Attack();
            dog.SayHi();
            dog.Run();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Interfaces!");

            Dogs dog = new Dogs();

            dog.Rollover();
            dog.SayHi();
            dog.Run();
        }