Monday, October 15, 2007

What is the diffrence between abstract(must inherit) class and inteface

Following are the main difference between abstract class and interface.

1. Abstract class can contain abstract method while interface does not.
2. Abstract class can contain method body while interface does not.
3. Methods in abstract class can contain any valid access specifier while in interface public access specifier is only allowed.
4. Abstract class can contain methods with body while interface can contain only method signature.

For VB.NET abtract class is must inherit class.
Share:

2 comments:

  1. "Interface can create multiple inheritance, while abstract class does not." - this point is missing.

    ReplyDelete

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews