OOPS

    
    public interface I1
    {
        void Add();
    }

    interface I2
    {
        void Add();
    }

    public class A : I1, I2
    {
        void I1.Add()
        {
            Console.WriteLine("A - I1");
        }

        void I2.Add()
        {
            Console.WriteLine("A - I2");
        }

    }


    class Program
    {

        static void Main(string[] args)
        {

            I1 obj2 = new A();
            obj2.Add();

            Console.ReadLine();
        }

    }

What will be Output of above program and Why???
Please comment below...

Comments

Post a Comment

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???