Why can?t you specify the accessibility modifier for methods
inside the interface?
Answer Posted / tsahi
Interfaces are designed to make sure a class which
implements them exposes a certain set of methods. Because
these methods are exposed, they must be public. therefore,
there is no point in implementing a method from an interface
which will be anything other than public. So all methods in
an interface are always public.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the difference between console and windows application?
What is difference between var dynamic and object in c#?
What is hash c#?
What are the benefits of using generics in c#?
Which is faster hashtable or dictionary?
What is deadly diamond problem?
What is the difference between namespace and class in c#?
What is difference between dictionary and hashtable in c#?
What is difference between a constant and read-only in C#?
What is hierarchical inheritance in c#?
What is generic collection in c#?
What is the use of tryparse in c#?
Why generics are used?
How do you define a predicate?
Can the accessibility of a type member be greater than the accessibility of its containing type?