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 ienumerator?

0 Answers  


Perfect Example Of While And Do-While Loop In C#.Net ?

0 Answers   Wipro,


What is private and shared assembly?

0 Answers  


Hai I am Shiva from TN, SSE.I have an query problem. My Table : Door Field : ID,DoorID,ZoneID,Date,Time,Status. Problem was : Status.We got two values, one is 00 (OUTTIME) , Another is 01(INTIME) Like this Status --------- 00 01 00 01 00 01 00 01 How to Set as Status 00 and 01 , of separate column , Status as Intime,Status as Outtime Like this ----------- InTime OutTime ---------- ----------- 01 00 01 00 01 00 01 00 01 00 01 00 Regards KS kumar

1 Answers  


Advantages of c# over vb.net?

3 Answers   HCL, Syntel,






What is the difference between private and protected in c#?

0 Answers  


What are the different types of assembly?

0 Answers  


What do you understand by an Implicit Variable?

0 Answers   CGI,


What does static mean in c sharp?

0 Answers  


What are the types of operator?

0 Answers  


What is Lambda Expression?

1 Answers  


How cache is implemented in web application for DB queries?

2 Answers   TCS,


Categories