Define interface in own words.
We have many books around, anyone can get a definition of interface which is nothing but bookish. In these days we are more interested to know what you know about interfaces rather than what you read for interfaces?
Here, I tried to cover interfaces in my own words:
Interface
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.
For more details and example refer to : http://gauravarora.indiamentor.com/Chapters/csharplanguageii.htm
Popularity: 8% [?]
Related interview questions
- What are Classes and structures
- What is differance between Abstract and Interface
- What are the good practices to use while designing for reuse
- In a WCF, does the datacontract belong in the interface or the class?
- Define Lambda expressions











Leave your response!
You must be logged in to post a comment.