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 difference between abstract class and interface in c#?
What is datareader c#?
What is alias in c#?
What are regular expressions? Search a string using regular expressions?
What is the difference between ref and out in c#?
What is the difference between const and readonly in c#.net?
When a Static Constructor is called in a Class?
How can you write a class to restrict that only one object of this class can be created (Singleton class)?
How do I create a .exe file?
What are the problem with .NET generics?
i want the csharp questions&answeres
What are the fundamental differences between value types and reference types?
Is there an equivalent of exit() for quitting a c# .net application?
How to use the sreamReader class to read form a text file?
What do you mean by default constructor?