InterviewSolution
| 1. |
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? |
|
Answer» namespace Interfaces 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. USING System; namespace Interfaces 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. using System; |
|