1. Abstract classes can implement some of its members (Methods or Properties that are not abstract) whereas interfaces cannot.
- abstract class MyClass {
- private int id;
- public int Id {
- set {
- this.id = value;
- }
- get {
- return this.id;
- }
- }
- }
But if we create an abstract property as in the following:
- abstract class MyClass {
- private int id;
- public abstract int Id {
- set {
- this.id = value;
- }
- get {
- return this.id;
- }
- }
- }

In an interface, we cannot provide an implementation. For example in the following:
- interface IOne {
- int MyProperty { get; set; }
- }
But if we try to implement it as in the following:
- interface IOne {
- int MyProperty {
- set {
- }
- get {
- rn 21;
- }
- }
- }

2. Abstract classes can have fields whereas interfaces cannot.
- abstract class MyClass {
- private int id;
- }
If we add a member to the interface and build our solution.
- interface IOne {
- public string name;
- }

3. An abstract class can inherit from another abstract class as well as interfaces whereas interfaces can only inherit from other interfaces.
- using System;
- namespace AbstractVsInterfaces {
- class MainClass {
- public static void Main() {
- }
- abstract class MyAbstract {
- }
- interface IOne {
- }
- interface ITwo {
- }
- interface IThree {
- }
- abstract class MyClass : MyAbstract, IOne, ITwo, IThree {
- }
- }
- }
In Interfaces
- using System;
- namespace AbstractVsInterfaces {
- class MainClass {
- public static void Main() {
- }
- abstract class MyAbstract {
- }
- interface IOne {
- }
- interface ITwo {
- }
- interface IThree:IOne,ITwo,MyAb {
- }
- abstract class MyClass {
- }
- }
- }

And if we try to inherit the IThree interface from the class by hardcoding the class name, we get the following error:

4. Abstract class members can have access modifiers whereas interfaces cannot.
There are a few similarities between the two:
- Both of them are incomplete.
- We cannot create their instances.
- Both of them can act as base types.

Gowtham RajamanickamPosted Mar 18, 2015, 3:38 AM
good show...
Pramod VermaPosted Feb 7, 2015, 6:48 AM
A class can inherit more than one Interface but only one Abstract class.
Humayun Kabir MamunPosted Jan 29, 2015, 6:06 AM
Nice...
Harpreet SinghPosted Jan 29, 2015, 3:12 AM
Pranay Rana Thank you for your contribution.I will definitely include it.
Pranay RanaPosted Jan 29, 2015, 2:42 AM
I think missing point here is : when to use Abstract class and when to use interface ...I hope you can include that also in your article....