Why can?t you specify the accessibility modifier for methods
inside the interface?
Answer Posted / lakshmi
Methods that implement an interface must be declared public. The reason for this is that methods are implicitly public within an interface, so their implementation must also public. Also the return type and signature of the implementing method must match exactly the return type and signature specified in the interface definition.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Give 2 scenarios where static constructors can be used?
What is interface inheritance?
What is the use of command builder?
What is difference between Enum and Struct?
what is the meaning of Object lifetime in OOPS
Expalin the way you implement inheritance by using VB.NET/C#?
What are immutable types in c#?
Is exe is machine dependent?
What are modifiers in c#?
What is the difference between first and firstordefault?
What is unrecognized escape sequence in c#?
What do you mean by sealed classes and static classes?
What is difference between const and static in c#?
Explain boxing and unboxing in c#?
What is a static field?