- You cannot extend or inherit more than 1 abstract class (C# does not provides multiple inheritance.)
- Struct cannot implement an abstract class.
- Struct can implement interfaces.
class MyClass : a,b ---ERROR--Cannot implement multiple base class.
abstract class a
abstract class b
Abstract class gives you all the benefits that interfaces does,except very important one feature “Multiple Inheritance“. This is the sole reason why we are asked to write “program to an interface”.You would argue that i would load a constructor with a abstract class rather than interface,but it would fail since you cannot implement more than one class and you need interface to do that.
Liskov Substitution Principle: SubType (Child Class)Must be Substitutable For Base Type(Base Class).
LSP comes into use when you use inheritance/Abstraction.
1.Child Class Should not remove Base Class Behaviour.
2.Child Class Should not violate base class invariants.
In short,the Calling code should not know whether it is calling the base class or derived class.