Hemalatha Sunnapu

Hemalatha Sunnapu

  • NA
  • 169
  • 20.3k

Interface,(multiple Inheritance)which one gets priority?

Jul 6 2018 11:49 AM
namespace Assembly
{
   interface I1
   {
      void Function(); 
   } 
   interface I2
   {
      void Function(); 
   }
   class Implementation:I1,I2
   {
       public void Function()
      {
         Console.WriteLine("interface function is defined in class Implementation"); 
      } 
      static void Main()
      {
         Implementation object1 = new Implementation();
         object1.Function(); 
      } 
   } 
 //NOW MY QUESTION IS...
Which interface Function is considered at the time of calling either I1 or I2? 
 
 
 
 
 
 
 

Answers (2)