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.

http://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx

http://www.codeproject.com/Articles/11155/Abstract-Class-versus-Interface

http://en.csharp-online.net/Interfaces_and_Abstract_Classes

http://leedumond.com/blog/interfaces-vs-abstract-base-classes/

Advertisements
By Sriramjithendra Posted in C#.NET

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s