Interfaces vs. Abstract Base Classes.

An abstract class is a class that can not be instantiated but that can contain code.
An interface only contains method definitions but does not contain any code.
With an interface, you need to implement all the methods defined in the interface.

If you have logic that will be the same for all the derived classes, it is best to go for a
abstract class in stead of an interface. 
You can implement multiple interfaces but only
inherit from one class.

By Sriramjithendra Posted in C#.NET

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s