LXer: What is Interface in C# and how to use it?
by LXer from LinuxQuestions.org on (#5B8RN)
Published at LXer:
An Interface in C# is a contract between Interface and class that implements it. This contract says any class that implements this interface will provide the implementation for the members of the Interface. Unlike, Abstract class, Interface in C# can only contain declaration not implementation. Because all the members of the Interface are abstract and cannot have an implementation. The keyword abstract will not be used with the members of the Interfaces but the compiler will treat them as abstract members.Just like Abstract and other special classes, Interfaces also come with some rules. Lets discuss those rules now.
Read More...


An Interface in C# is a contract between Interface and class that implements it. This contract says any class that implements this interface will provide the implementation for the members of the Interface. Unlike, Abstract class, Interface in C# can only contain declaration not implementation. Because all the members of the Interface are abstract and cannot have an implementation. The keyword abstract will not be used with the members of the Interfaces but the compiler will treat them as abstract members.Just like Abstract and other special classes, Interfaces also come with some rules. Lets discuss those rules now.
Read More...