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
what is c# command?
What is the difference between func and action delegate?
What does this keyword mean in c#?
Why main method is static in c#?
How many constructors can a class have c#?
Why to use “finally” block in c#?
How to transpose multi-dimensional array?
What is the default value of string in c#?
How many types of serialization are there in c#?
Define constructor in c#.
What is generic in c#?
Are cao stateful in nature?
What's the difference between class and object?
What is delegates in c#?
What does a constructor do c#?