示例#1
0
        static void Main()
        {
            ConcreteClass instance = new ConcreteClass();
            instance.Method();

            // Delay.
            Console.ReadKey();
        }
示例#2
0
        static void Main()
        {
            ConcreteClass instance = new ConcreteClass();

            instance.Method();

            // Delay.
            Console.ReadKey();
        }
示例#3
0
        static void Main()
        {
            ConcreteClass instance = new ConcreteClass();
            instance.Method();

            IInterface1 instance1 = instance as IInterface1;
            instance1.Method();

            IInterface2 instance2 = instance as IInterface2;
            instance2.Method();

            // Delay.
            Console.ReadKey();
        }
示例#4
0
        static void Main()
        {
            ConcreteClass instance = new ConcreteClass();
            //instance.Method();

            IInterface1 instance1 = instance as IInterface1;

            instance1.Method();

            IInterface2 instance2 = instance as IInterface2;

            instance2.Method();

            // Delay.
            Console.ReadKey();
        }