Why can?t you specify the accessibility modifier for methods
inside the interface?
Answers were Sorted based on User's Feedback
Answer / guest
They all must be public. Therefore, to prevent you from
getting the false impression that you have any freedom of
choice, you are not allowed to specify any accessibility,
it?s public by default
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / kumar vaibhav
Because Interface provides different implementation within calling class.So it should be public.
Is This Answer Correct ? | 2 Yes | 0 No |
What is a collection in c#?
What is use of console?
What are primitive types in c#?
If I want to override a method 1 of class A and in class b then how do you declare ?
Write a program to find the angle between the hours and minutes in a clock
What is the difference between a variable and a literal?
Why do we use dictionary in c#?
What is lambda expression in c#?
What?s the difference between <c> and <code> XML documentation tag?
What's difference between constants and static readonly?
What is dataset and dataadapter in c#?
Is there throws keyword in c#?