interface G1 {// method declarationvoid mymethod();}interface G2 {// method declarationvoid mymethod();}// Geeks implements both// G1 and G2 interfaceclass Geeks : G1, G2{// Here mymethod belongs to// G1 interfacevoid G1.mymethod(){Console.WriteLine("GeeksforGeeks");}// Here mymethod belongs to// G2 interfacevoid G2.mymethod(){Console.WriteLine("GeeksforGeeks");}}
Interviews4 answers
Multiple Interfaces with same Method
4 Answers
Rajanikant HawaldarPosted Oct 13, 2022, 10:56 AM EDT
To show what happens to the possible conflicts if you
implement multiple interfaces: there are no conflicts.
If multiple interfaces have the exact same method, you
merely have to implement it.
If multiple interfaces have similar methods, you must
implement them all.There's still no conflict.
Priyaranjan PatiPosted Aug 13, 2009, 2:55 AM EDT
Hi ,
Same Method in Both the Interface u just Impliment the One Interface that it.ok i will give with examples later.ok bye
P NarasimhaPosted Jul 16, 2009, 9:41 PM EDT
We have two Interface A and B both have one method common in them i.e. GetCustomer(), Suppose if Class C will implement both the interfaces than what will be the implications of Common Method on it.
kalit sikkaPosted Jul 3, 2009, 3:49 AM EDT

