This is a tricky Question, if I create 2 interface with same method name, and implement both in one class. Now if create object of this derived class, which method it will pick-up/Execute at run time.
To test this need to create 2 interface with same method Name.
Now create a class to implement both interfaces
public class DerivedClass : IFace1, IFace2
Console.WriteLine(" Constructor Called. ");
Console.WriteLine(" IFace1.GetFaceDetails ");
Console.WriteLine(" IFace2.GetFaceDetails ");
Now to use this if I create an object of IFace1 then It will call IFace1.GetFaceDetails Method.
IFace1 obj1 = new DerivedClass();
So it will print " IFace1.GetFaceDetails "
Similarly if I create an object of IFace2 then It will call IFace2.GetFaceDetails Method.
IFace2 obj2 = new DerivedClass();
So it will print " IFace2.GetFaceDetails "
Now what if I create an object of DerivedClass itself.
DerivedClass obj = new DerivedClass();
In above code it will show a compiler error that GetFaceDetails Method doesn’t exists in DerivedClass. So it will not execute at all. Or you will have to create another method with same name in class, and compiler will pick that method in execution.