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
Can partial class be inherited?
Is there hashmap in c#?
What is difference between singleordefault and firstordefault?
What is an escape sequence?
What do you know about Translate Accelerator?
Explain how do you convert a value-type to a reference-type?
Can constructor be protected?
What is option parameter in C#?
What is the use of 0 in c#?
What is a console device?
What is the difference between static and constant variables?
Why to use lock statement in c#?
What is datarelation c#?
Are c# references the same as c++ references?
How you will create satellite assemblies?