Пример #1
0
        static void Main(string[] args)
        {
            //implicitly implemented methods can be invoked implicitly and explicitly
            //implicit
            Sample sample = new Sample();

            //sample.Foo();
            //sample.Foo1();
            sample.Foo2();
            sample.ClsMethod();

            //explicitly implemented methods can be invoked ONLY explicitly
            //explicit invocation
            IA ia = sample;

            ia.Foo1();
            ia.Foo();

            IB ib = sample;

            ib.Foo();
            ib.Foo2();
        }