OOPS

interface I1
    {
        void Add();
    }

    class A
    {
        public void Add()
        {
            Console.WriteLine("A");
        }
    }

    class B : A, I1
    {

    }



Reason: Class B inherit parent class data member and member function so  Interface I1 get its implementation inside parents class i.e. class A.

Comments

Popular posts from this blog

iframe vs embed vs object in HTML 5

Constructor in c#

What is the need of method overriding ???