Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem Overloading CTOR
Message
From
23/06/2009 09:49:28
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
23/06/2009 07:56:05
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01407726
Message ID:
01407776
Views:
26
>>I typically just move my code out of the constructor and have them call an initialize method but would this work?
>>
>>
>>public ColumnHeader() : this(null)
>>{
>>}
>>
>>
>
>
>Tim,
>
>Great - I was struggling with constructs like this yesterday - constructor x using code of constructor y
>
>I knew one could use (:base(...) - that's another context), but I did not know about (:this(..))

I am glad it was helpful. I try not to put too much code in the constructor since I work so much with component stuff and the constructor can't be overriden. Perfectly OK if a concrete class with no intention to ever sub class it. I use a Initilaize() method a lot to get around that and just call it from the constructor.
Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform