Jigar Tailor

Jigar Tailor

  • NA
  • 3
  • 710

Confusion in Multiple Inheritance using Interface.

Jun 2 2015 12:23 AM
Hi All,
 
I have one confusion in following code.
 
class Program
{
   static void Main(string[] args)
   {
      MyClass myClass = new MyClass();
      myClass.Display();
      Console.ReadKey();
   }
}
public interface IOne
{
   void Display();
}
 
public interface ITwo
{
   void Display();
}
public class MyClass : IOne, ITwo
{
   public void Display()
   {
      Console.WriteLine("test");
   }
}
In above code which display method will get called Display() of IOne or Display() of ITwo? 

Answers (4)