Facts About Abstract Classes

1. Abstract class can'nt have abstract constructor because constructor can'nt be inherited.
2. It can have destructor but it can'nt be abstract or virtual.
3. Abstract class can'nt be a sealed class.
4. Member fields can'nt be abstract.
5. It can have abstract property and events.
6. It can have static and virtual events.
7. Abstract and virtual property, event or method can'nt be private although it can be protected,internal or protected internal.
8. Abstract members can'nt have virtual modifier because they are implicitly virtual.
9. Can'nt change access modifier while overriding member of the abstract class in the derived abstract or contrete class.
10. Any class derived from abstract class either should define all the abstract method of the abstract base class or should be declared abstract class as well. In that case derived abstract class needs not to declare abstract member of base class again.
11. It is possible to have abstract class without any abstract members (method, event or property etc.). But a non abstract class can not have any abstract member.
12. Abstract class can be derived from concrete (non abstract) class.

No comments: