Abstract classes in C sharp Arabic #31
Suggested Videos
Explicit interface implementation in C sharp Arabic #30
❑ About abstract classes.
Abstract classes
❑ The abstract keyword is used to create abstract classes.
❑ An abstract class is incomplete and hence cannot be instantiated.
❑ An abstract class can only be used as base class.
❑ An abstract class cannot be sealed.
❑ An abstract class may contain abstract members(methods, properties, indexers , and events), but not mandatory.
❑ A non-abstract class derived from an abstract class must provide implementations for all inherited abstract members.
❑ If a class inherits an abstract class, there are 2 options available for that class
❑ Option1: provide implementation for all the abstract members inherited from the base abstract class.
❑ Option 2: if the class does not with to provide implementation for all the abstract members inherited from the abstract class , then the class has to be marked as abstract.
Tags:
C sharp