A class inherits from 2 interfaces and both the interfaces have the same method name as shown below. How should the class implement the drive method for both Car and Bus interface?
namespace Interfaces { interface Car { void Drive(); } interface Bus { void Drive(); } class Demo : Car,Bus { //How to implement the Drive() Method inherited from Bus and Car } } To implement the Drive() method use the fully qualified name as shown in the example below. To call the respective interface drive method type cast the demo object to the respective interface and then call the drive method.