Sunday 27 May 2012

Abstract Class in C#



The class which can't be instantiated (we can't create Object for this class) is known as an Abstract Class. This particular article contains the details of an Abstract Class.
Introduction:
The class which cannot be instantiated is known as an Abstract Class. That is, an object of  it can’t be created. But it should be inherited.
Features of an Abstract Class
*we can't create Object for this class
*An Abstract Class Should is inherited.
*It may have use Methods.
*It may have Abstract Methods.
*An Abstract Method of an Abstract Class should be overridden.
*An Abstract Class can only contain Abstract Method.

We can't create Object for this class:

Error Message:


An Abstract Class Should is inherited :

Result:
It may have use Methods:


 Result:

It may have Abstract Methods:

Error Message:



An Abstract Class can only be in Abstract Method





No comments:

Post a Comment