Part 7: C# Tutorial – Abstract Classes vs Interfaces

In this article we will cover following points

1. Difference between Abstract Classes and Interfaces

Abstract classes vs Interfaces

1. An abstract class is a special kind of class which is created using the abstract keyword. It can
not be instantiated. It can have implementation for some or all of its members.

2. Interface is created using the Interface keyword. Interface can have only declaration for its
members and no implementation.

3. An abstract class can inherit from interface or another abstract class. It can inherit from
multiple interfaces at the same time.

4. Interface can inherit only from another interface. It can inherit from multiple interfaces.

5. An abstract class can have access modifiers for its members.

6. Interface can not have access modifiers for its members. All the members of an interface is
assumed as public.

7. If we add a new method or member to an abstract class then we have the option to provide
default implementation & therefore all the existing code will work.

8. If we add a new member declaration in interface, we will have to track down all the
implementation of the interface & implement new method.

9. Abstract classes can have fields. But Interfaces can not have fields.

10 thoughts on “Part 7: C# Tutorial – Abstract Classes vs Interfaces

    1. surendra Post author

      thanks for your feedback.

      i am not sure if i understood clearly about invite post on your blog. would it possible for you to provide more detail about it.

  1. that site

    Pretty great post. I simply stumbled upon your weblog and wanted to say that I’ve really loved browsing your weblog posts. After all I will be subscribing to your rss feed and I hope you write again very soon!

  2. Lenard Agnew

    I’m impressed, I have to say. Really rarely do I encounter a weblog that’s each educative and entertaining, and let me let you know, you will have hit the nail on the head. Your thought is outstanding; the problem is something that not enough individuals are talking intelligently about. I am very blissful that I stumbled across this in my search for one thing regarding this.

  3. Carlos Brodtmann

    It’s a shame you don’t have a donate button! I’d certainly donate to this brilliant blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this blog with my Facebook group. Talk soon!

Leave a Reply

Your email address will not be published. Required fields are marked *