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 are the differences between a class and a struct?
What is polymorphism c# example?
What is the property of a class in c#?
What is the difference between writeline and write in c#?
What is the advantage of dependency injection?
What is parameterized constructor?
What is the difference between static class and singleton class in c#?
What is the difference between interface and inheritance in c#?
What is difference between internal and protected internal in c#?
Why do I get a security exception when I try to run my c# app?
What is transparent caching with aop ?
Is c# a keyword?
What are variables in c#?
Describe a Struct ?
What is join in c#?