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
What are virtual destructors?
How can you write a class to restrict that only one object of this class can be created (Singleton class)?
What is desktop application testing?
What is thread safe in c#?
How does bitwise work?
What is the difference between decimal and integer?
Why dictionary is faster than list?
Differentiate between the public and private ?
Is int a class in c#?
What does m mean in decimal c#?
What is the meaning of 0 in c#?
What does the parsefloat function do?
What is tuple in c#?
What is namespace give the example?
Is it true that all c# types derive from a common base class?