DannyT Posted August 16, 2005 Posted August 16, 2005 Is there anyway to implment an abstract constructor? I.e. how can i acheive the following: - public abstract class MyAbstract { public abstract MyAbstract(); } I get the message "The modifier 'abstract' is not valid for this item" which i can understand by i wish to implement 3 overridable, overloading constructors for an abstract class. Can/should i do this? if not what am i not grasping properly? Cheers, Quote
dinoboy Posted August 17, 2005 Posted August 17, 2005 But if you call just ? public MyAbstract() { } Quote
*Experts* Nerseus Posted August 17, 2005 *Experts* Posted August 17, 2005 You don't really need abstract on a constructor - it's always overridable (and you never need the word override on the constructor in an inheriting class). It's a special case. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
DannyT Posted August 17, 2005 Author Posted August 17, 2005 Apologies I did not put anywhere near enough explanation into that, was the end of the day and i think my mind was elsewhere... I've sorted out what i was trying to achieve now, thanks for the replies! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.