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

Answers were Sorted based on User's Feedback



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

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

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

Answer / kumar vaibhav

Because Interface provides different implementation within calling class.So it should be public.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is a collection in c#?

0 Answers  


What is use of console?

0 Answers  


What are primitive types in c#?

0 Answers  


If I want to override a method 1 of class A and in class b then how do you declare ?

4 Answers   MMTS,


Write a program to find the angle between the hours and minutes in a clock

0 Answers  






What is the difference between a variable and a literal?

0 Answers  


Why do we use dictionary in c#?

0 Answers  


What is lambda expression in c#?

0 Answers  


What?s the difference between <c> and <code> XML documentation tag?

1 Answers  


What's difference between constants and static readonly?

0 Answers   Wipro,


What is dataset and dataadapter in c#?

0 Answers  


Is there throws keyword in c#?

0 Answers  


Categories