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

Answer Posted / tsahi

Interfaces are designed to make sure a class which
implements them exposes a certain set of methods. Because
these methods are exposed, they must be public. therefore,
there is no point in implementing a method from an interface
which will be anything other than public. So all methods in
an interface are always public.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c# used for any core features of windows vista?

525


What is overloading with example?

501


What does m mean in decimal c#?

498


what is IFormatable

580


Explain how can I get around scope problems in a try/catch?

488






What is the purpose of a console table?

475


what is a constructor? What is a destructor?

526


What is the data type for bit in c#?

476


Can we have only “try” block without “catch” block in c#?

477


What are different types of Delegates in C#?

567


What are some examples of desktop applications?

504


What is a delegate? Explain.

538


What are the different types of delegation?

443


Is it possible to inherit multiple interfaces?

543


Whats an assembly? Describe the importance of assembly?

499