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 |
Can You Prevent Your Class From Being Inherited By Another Class?
Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?
What is called method in c#?
Explain About .Net remoting
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; } }
What is state c#?
what are ways to debug the code step by step except using breakpoints?
Why do we need reflection in c#?
What is private virtual in C#?
Define MSIL, and how does it works? Why our developers need an appreciation of it if at all?
Which of these statements correctly declares a two-dimensional array in c#?
Is string passed by reference in c#?