Constructors in Abstract Class
Is it possible to form Constructor In abstract Class ?? If formed then why cant we create its intsance??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Michal HabalcikPosted Jan 28, 2015, 1:58 AM
Here is some more info from MSDN: Abstract types should not have constructors
Bhushan GawalePosted Jan 28, 2015, 1:53 AM
Consider the scenario wherein the child class inheriting from the base abstract class wants to inherit the base constructor or abstract class's constructor needs to initialize some member variables.
You can refer this nice example explains the use of the abstract class's constructor
http://stackoverflow.com/questions/19944644/why-can-an-abstract-class-have-constructor