C# allows both classes and function to be declared abstract by using abstract keyword.
You can't create an instance of an abstract class .An abstract member has a signature but no function body and they must be overridden in any non-abstract derived class.
Abstract classes exist primarily for inheritance. Member functions, properties, indexer can be abstract.
A class with one or more abstract members must be abstract as well.
An abstractclass is a special kind of class that cannot be instantiated. An abstractclass is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.
Ajay YadavPosted Oct 27, 2014, 9:52 PM
Abstract Classes manifest couple of features as;
C# allows both classes and function to be declared abstract by using abstract keyword.
You can't create an instance of an abstract class .An abstract member has a signature but no function body and they must be overridden in any non-abstract derived class.
Abstract classes exist primarily for inheritance. Member functions, properties, indexer can be abstract.
A class with one or more abstract members must be abstract as well.
Static members can't be abstract.
Yadagiri ReddyPosted Oct 27, 2014, 3:37 PM