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

Answer Posted / lakshmi

Methods that implement an interface must be declared public. The reason for this is that methods are implicitly public within an interface, so their implementation must also public. Also the return type and signature of the implementing method must match exactly the return type and signature specified in the interface definition.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you escape a character?

699


What is difference between sleep () and wait ()?

712


What are methods c#?

659


What is enum in c#?

715


i want o/p 011242110 in c# code.

1861


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

16898


What is main thread in c#?

691


Do vs while c#?

674


Explain About Global.asax

737


What is an object and a class?

769


What is a private method in c#?

692


What is difference between === and ==?

656


What is lazy loading and eager loading in c#?

676


What is args c#?

716


What are the different types of constructors in c#?

807