Abstract Class
Abstract Class
- An abstract class is a class that contains one or more abstract methods
- Abstract Class may contain constructor but interface does not contain constructor.
- In Interface all methods should be public but not in abstract class
-
Abstract class we can put sharable code
-
Its not Possible to create instance of Abstract class
-
it cannot be instantiated on it’s own, it must be inherited.
-
Abstract Class can used One Overriding method
-
abstract classes can specify members that must be implemented in inheriting classes
-
a class can inherit only one abstract class
-
abstract class must use the
MustInheritkeyword. -
An abstract class like all other classes can implement any number of members
-
To declare an abstract member we use the MustOverride keyword
How we have to create Abstract Class