If there are 2 interface IParentInterface &
IChildInterface as follows.
interface IParentInterface
{
void InterfaceMethod();
}
interface IChildInterface : IParentInterface
{
void InterfaceMethod();
}
Both the interface contains method with same name
InterfaceMethod().
How InterfaceMethod() will be handled in IChildInterface as
its deriving IParentInterface
Answer Posted / anurag
use
void IChildInterface.InterfaceMethod(){}
don't use access modifier with explicit method.
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Can partial class be inherited?
How many bytes is an int c#?
what are pointer types in c#
What is action c#?
If c# destructors are so different to c++ destructors, why did ms use the same syntax?
What is a bool in c#?
Is dictionary reference type c#?
Why constructor is used in c#?
Can we assign null value to integer?
What happens if the inherited interfaces have conflicting method names?
How can you read 3rd line from a text file?
What is the use of parse in c#?
Explain the concepts of cts and cls(common language specification).
What is difference between dll and exe in c#?
What is console used for?