If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Class Constructors

Hi, I'm pacify and this is my first time posting.

Anyways, I have simple, class design type of question.

I'm reading up a little bit on C# programming. The book that I'm reading recommends creating constructors in the following way: "the root constructor should represent the constructor with the most parameters. This should then call the constructor with the next level of paramets setting any data not handled by that constructor itself"(Guide to C# and...... )

I do not understand the reasoning behind calling all the constructors in a class. It seems to me that some variables would be continously reinitialized as your progressed from the simplest, 0-parameter constructor, to the most parameter encompassing (most overloaded constructor).

If, when I created an object, I wanted to do something additional, I could make the change in one loacation and know it will be implimented regardless of which constructor is called. If I had made each of the constructors separate, then I'd have to make the change in each one, thus opening up the chance that I'd forget or mess one up....