Monday, August 1, 2011

Define interface in own words

An interface is simply a collection of function prototypes. An Interface is a reference type like a class, but interface can contain only abstract members. In other words, Interface is a contract that defines the signature of the functionality.

An interface looks like a class definitions, but its only purpose is to define a set of methods and not to implement them. For this reason the interface definition includes only the definition of methods [in other words the abstract methods]. Interface contains only methods, properties and delegates but can not contain fields, constructors, destructor and any type of static members.

No comments:

Post a Comment