Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Thursday, June 6, 2013

Information about Interfaces in C# - what they can have and what not

This is taken directly from C# reference document from Microsoft (I recommend reading it)
  • An interface declaration may declare zero or more members
  • The members of an interface must be methods, properties, events, or indexers
  • An interface cannot contain constants, fields, operators, instance constructors, destructors, or types, nor can an interface contain static members of any kind.
All interface members implicitly have public access. It is a compile-time error for interface member declarations to include any modifiers. In particular, interfaces members cannot be declared with the modifiers abstract, public, protected, internal, private, virtual, override, or static.