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
Explain how obfuscator works in .net
What is the reason behind the invention of c#?
What is the difference between IEnumerator and IEnumerable?
What Is A Satellite Assembly?
What is #region in c#?
What is a string c#?
What is difference between abstract class and interface in c#?
Is for loop faster than foreach?
What do you mean by saying a "class is a reference type"?
What is double c#?
What is c# used for in the industry?
What is the purpose of constructor in c#?
What is expression tree in c#?
Are string objects mutable or immutable?
What are the properties of c#?