Can We Inherit An Abstract Class From A Class ? [Resolved]

Posted by Kasani007 under C# on 7/13/2015 | Points: 10 | Views : 435 | Status : [Member] | Replies : 2
Can We Inherit An Abstract Class From A Class ?




Responses

Posted by: Sheonarayan on: 7/14/2015 [Administrator] HonoraryPlatinum | Points: 50

Up
0
Down

Resolved
Dear Kasani,

The whole purpose of Abstract class is that it should be inherited if we want to use its methods. We can't instantiate this class so in order to use it we must inherit it into another class and then can use its methods.

Read this article written by me on Abstract class - http://www.dotnetfunda.com/articles/show/467/abstract-class-explained. You can also read this article http://www.dotnetfunda.com/articles/show/1183/abstract-class.

Thanks


Regards,
Sheo Narayan
http://www.dotnetfunda.com

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shreedar on: 8/15/2015 [Member] Starter | Points: 25

Up
0
Down
Hi

You should know why we are using abstract class.
Reasons are below.
1.If you want a particular method in classA to be implemented in all of its child classes, then we will declare that method as abstract method.

2.If we declare a method as abstract means it should overriden in the child class.

3.If a class contains atleast one abstract method then we must declare that class as abstract class.

Hope u understood. If you are satisfied mark as answer.

Regards,
Sridhar Thota.

Regards

Sridhar Thota.
www.dotnet-sridhar.blogspot.com

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response