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
Can we write class inside a class in c#?
What is a dynamic assembly?
In .NET how can you solve the DLL Hell problem?
Why do we use classes?
What is base class in c#?
What is the difference between CreateObject() and GetObject()?
What is indexer c#?
How do you remove white spaces from a string?
How we convert private assembly into public assembly?
Is string immutable in c#?
What is hashset c#?
how to print invert pyramid in c#
Can a method be sealed in c#?
what is a structure in c#
What is dbcontext c#?