Multiple inheritance using two interfaces



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//Program to implement Multiple Inheritance Using Two Interfaces at Base Level
namespace CAInterface1
{        
    interface I1
    {
        void F1(); 
    }
    interface I2
    {
        void F1();
    }
    class C:I1,I2
    {
        public void F1()
        {
            Console.WriteLine("his is overriding         function of I1,I2 Interface");  
        }
    }
    class ClsInterface1
    {
        static void Main(string[] args)
        {
            C obj1 = new C();
            obj1.F1();
            Console.ReadLine();
        }
    }
}




Output:-


No comments:

Post a Comment