Re: overload constructor



Thanks Thi

Being still at the learning gate of this language I like to get clarity
about the various elements. Most of the books I have read or are reading
about C# seem to assume that the readers understand these concepts and
therefore they skim over a detailed explanation.

Do you know of any website links that cover these concepts? I struggled
with 'state' for a while because the material that I was reading assumed it
was obvious - maybe not to me.

Thanks again to you and Jon.

Doug
"Truong Hong Thi" <thi1981@xxxxxxxxx> wrote in message
news:1133586636.114534.289110@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi Doug,
>
> Doug wrote:
>>And overloading would allow different parameters to be provided to the
>>method of different instances of that class??
> This sentence appears difficult to understand.
> The constructor is a special method used to initialize the instance.
> The parameters of the constructor are used to initialize the object.
> Sometimes you wish to specify more values; sometimes you want to
> specify less and let the object uses defaults; sometimes you could only
> specify some at the time of instantiation, and will set some properties
> later. Constructor overloading makes life easier by provide you with
> many choices to initialize the object at the time it is created.
>
> Thi
>


.



Relevant Pages

  • Re: overload constructor
    ... The constructor is a special method used to initialize the instance. ... Sometimes you wish to specify more values; sometimes you want to specify less and let the object uses defaults; sometimes you could only specify some at the time of instantiation, and will set some properties later. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: overload constructor
    ... >And overloading would allow different parameters to be provided to the ... The constructor is a special method used to initialize the instance. ... Sometimes you wish to specify more values; ...
    (microsoft.public.dotnet.languages.csharp)
  • For discussion, semantic construct
    ... Sometimes you need to signal a particular meaning of a parameter. ... and can specify these parameters. ... It keeps a list of constructor descriptions, ... if kwarval is SpecialFlag: ...
    (comp.lang.python)
  • Re: Inherited Methods and such
    ... what I see in Initialize is ... Now, what you want is to get in the constructor of some S derived from T, ... The base types and registry are part of the framework and the user ... provides the concrete factories. ...
    (comp.lang.ada)
  • Re: initialising properties in static constructor
    ... When static constructor is static it cannot initialize instance variables ... To intialize them in the constructor. ...
    (microsoft.public.dotnet.languages.csharp)

Loading