Why do members of an interface don't have access modifiers?

  • An interface is just a contract for use to the outside world and hence we don't specify any access specifiers to the members of an interface.
  • The members are all public by default.
interface IDope {
  int DoProp {get;set;}
  int DoAdd(int a, int b);

C# Concepts Posted May 14, 2021

You can now show your support. 😊

We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept