Exemple #1
0
        public void InterfacesTest()
        {
            Implementation imp = new Implementation();

            IInterface1 i1 = imp;

            IInterface2 i2 = imp;

            Console.WriteLine("A call from implementation directly");
            imp.DoSmth();

            Console.WriteLine("A call from interface1 ");
            i1.DoSmth();

            Console.WriteLine("A call from interface2 ");
            i2.DoSmth();
        }