Why can?t you specify the accessibility modifier for
methods inside the interface?

Answer Posted / swapna

They all must be public. Therefore, to prevent us from
getting the false impression that we have choice to access,
so we are not allowed to specify any accessibility, it's
public by default.

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you prevent a class from being inherited in c#?

454


What is enumerable in c#?

479


Which class comes after the SortedList class?

570


If I return out of a try/finally in c#, does the code in the finally-clause run?

556


How would you describe encapsulation in c#?

486






What's the difference between System.String and System..StringBuilder in C#?

506


What is msil, and why should developers need an appreciation of it if at all?

576


Explain the Different types of configuration files in .net?

575


What is a satellite assembly in c#?

554


What is difference between arraylist and list in c#?

438


Why do we use polymorphism in c#?

478


What is the purpose of escape sequence?

585


What is session management in c#?

533


What is an enumerator c#?

518


What is token in c#?

532