Hemalatha Sunnapu

Hemalatha Sunnapu

  • 1.8k
  • 169
  • 9.2k

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? 
 
 
 
 
 
 
 

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (2)