Abstract Class in C#

By | December 9, 2017

Abstract Class in C#

a) Classes can be declared as abstract class by using abstract keyword.

b) Abstract class is designed to act as a base class (to be inherited by other classes).Abstract class is a design concept in program development and provides a base upon which other classes are built.

c) Abstract class does not allow creating instance or object of it; we must inherit to use it, pls. check below fig.

abstract class in c#

abstract class in c# fig1

d) Abstract classes can have abstract methods as well as non-abstract methods (which must be implemented in the child class).

what are abstract classes in c#.net

what are abstract classes in c#.net

e)  A non-abstract class derived from an Abstract class must include implementations for all inherited abstract methods.

abstract class in c# with real time example

abstract class in c# with real time example

f)  An abstract class cannot be a sealed or static class.

g) An abstract method cannot be private, protected or protected internal.

h) An abstract member cannot be static.

Leave a Reply

Your email address will not be published. Required fields are marked *