hi friend
what is the difference between interface and abstract
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Sep 28, 2007, 11:35 AM
In addition to that excellent article which Mahesh has linked to, here is a quick summary of the main differences between interfaces and abstract classes:
1. A class can implement multiple interfaces but can only inherit from one abstract class.
2. An interface never provides an implementation of any of its members, all of which are implicitly public. All classes which implement the interface MUST provide implementations for all its members.
3. An abstract class can provide both abstract and 'concrete' members. It never provides implementations for its abstract members, this being left to derived classses unless they themselves are abstract. However, it does need to provide implementations for concrete members in the normal way.
4. An interface cannot contain fields, constructors, destructors or static members of any description but an abstract class can. However, none of these can be abstract and instance constructors are normally 'protected' so that the abstract class cannot be instantiated externally.
Mahesh ChandPosted Sep 28, 2007, 11:18 AM
http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx?ArticleID=cd6a6952-530a-4250-a6d7-54717ef3b345