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

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

            instance.Method();

            // Delay.
            Console.ReadKey();
        }
Beispiel #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();
        }
Beispiel #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();
        }