Home > DeveloperSection > Interviews > What is the difference between class and an Interface?

Posted on    January-27-2014 11:05 PM

 C# C# 
 1 Answer(s)
  1298  View(s)
Rate this:

Sumit Kesarwani

Total Post:782

Posted on    January-27-2014 1:00 AM

Abstract classes can have implementations for some of its members, but the interface can't have implementation for any of its members.

Interfaces cannot have fields where as an abstract class can have fields.

An interface can inherit from another interface only and cannot inherit from an abstract class, where as an abstract class can inherit from another abstract class or another interface.

A class can inherit from multiple interfaces at the same time, where as a class cannot inherit from multiple classes at the same time.

Abstract class members can have access modifiers where as interface members cannot have access modifiers.

Don't want to miss updates? Please click the below button!

Follow MindStick