Differences between interface and abstract class in c#
In this article, I have explained the difference between an Abstract Class and an Interface in C#.
It is little confusing when we are discussing
about an abstract class and interface in C#. Some similarities and
differences between an interface and an abstract class are following.
||Interface can implement multiple
||It can not
||An interface has no
An abstract class can provide complete, default code
and/or just the details that have to be overridden.
||All interfaces are by default
public and abstract
||An abstract class can contain access
||Requires more time to find
the actual method in the corresponding classes.
implementations only share method signatures then it is better to use
implementations are of the same kind and use common behaviour or status
then abstract class is better to use.
|Fields and Constants
||No fields can be defined in interfaces
||An abstract class can have fields and