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

Can You Prevent Your Class From Being Inherited By Another Class?

0 Answers   Siebel Systems,


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

0 Answers  


What is called method in c#?

0 Answers  


Explain About .Net remoting

0 Answers   Digital GlobalSoft,


what will be the output of the given below coding. using System; public class Exercise { static void OddNumbers(int a) { if (a >= 1) { Console.Write("{0}, ", a); a -= 2; OddNumbers(a); } } public static int Main() { const int Number = 9; Console.WriteLine("Odd Numbers"); OddNumbers(Number); Console.WriteLine(); return 0; } }

1 Answers   iGate,






What is state c#?

0 Answers  


what are ways to debug the code step by step except using breakpoints?

1 Answers  


Why do we need reflection in c#?

0 Answers  


What is private virtual in C#?

0 Answers   CDC,


Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?

0 Answers   Siebel,


Which of these statements correctly declares a two-dimensional array in c#?

0 Answers  


Is string passed by reference in c#?

0 Answers  


Categories