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

Answer Posted / kishore anumala

Always the access specifiers for the method in an interface
is public. We cannot implement the methods of interface if
the access specifier is other than public as we will be
left with errors like "members cannot access due to
protection level".

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can main method be final?

672


What are the two kinds of properties in c#.

685


How are delegates chosen?

654


What are PE(Portable Executable)?

728


Can class be protected in c#?

706


What is a derived class in c#?

724


What is the function of .IsDescendent()?

783


There were a lot of questions asked, so I will list the topic (and add a what is "topic" and know pros/cons). Extreme programming, what is a transaction, various SDLC design approaches, what is a namespace, define a good test case, what is a stored proc, webservice? design patterns? linker? compiler? access modifiers? stack vs. queue? arrays vs. linked lists? sorting algorithms? recursion? OOP principles?

1788


Is dictionary a collection?

635


What's your approach to fetch static data in your windows form application?

731


What is a ienumerator?

700


What is the difference between == and object.equals?

675


Can we overload indexer in c#?

670


What is func c#?

773


What is default c#?

714