Let's say i have two interfaces : interface1 and interface 2, they both have method called MyMethod(), Let's say we have class1 , with implementing interface1 and interface2 . is it possible?
6
Answers
Let's say i have two interfaces : interface1 and interface 2, they both have method called MyMethod(), Let's say we have class1 , with implementing interface1 and interface2 . is it possible?
Yes, it's possible and we can achieve this. this is called Explicit interface calling and we call both method with interface like
interface1.MyMethod1()
Yes we can do, that is called explicit interface calling:
suppose you are calling MyMethod for interface1
then you need to write
Interface1.MyMethod
and for interface2 you need to write
Interface2.MyMethod
Yes , it is possible, interface implementing class can differentiate method using following syntax in the interface implementing class
Definition of interface1. MyMethod()
Definition of interface2.MyMethod()