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

Is list immutable in c#?

1 Answers  


What is out int in c#?

1 Answers  


Are classes passed by reference in c#?

1 Answers  


What are the security issues if we send a query from the application?

1 Answers   Microsoft,


Explain ACID rule of thumb for transactions.

1 Answers  


What is Web.config?

1 Answers   Amazon,


Is arraylist generic in c#?

1 Answers  


Why do we use static methods in c#?

1 Answers  


What are generics in c#.net?

1 Answers  


What is static void main in c#?

1 Answers  


Can we inherit two classes in c#?

1 Answers  


What is Lambda Expression?

1 Answers  


Categories