Possible Duplicate:
Why can’t I create an abstract constructor on an abstract C# class?
Can abstract class’s Constructor be marked as ‘abstract’?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. C# does not support this in any version. Note that constructors are not inherited in derived classes, although they can be “chained”. This is probably what you want to be doing.
If you want to indicate that the derived class should be doing some sort of initialisation, you could create an abstract
Initialisemethod or such which the constructor of the base class (and indirectly of the sub-class) calls on creation.As a side point, I’m not sure whether the CLR (or associated CIL language) actually supports it – I would suspect it may, though there is little use for it from within C# for the reason just mentioned.