Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Constructor overloading
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00996906
Message ID:
00996922
Views:
9
>I am having one of those moments where I can't remember syntax (might be related to too much green beer <s>)
>I am trying to overload a constructor:
>
>public myConstructor(string para0)
>{
>  // call the "2nd" constructor passing para0 and the string "einar" for para1
>}
>
>public myConstructor(string para0, string para1)
>{
>  // do something i.e. constructor code
>}
>
>
>How do I call the constructor again passing 2 parameters from the constructor accepting 1 parameter?
>
>Einar

Einar,

I believe the syntax is:
public myConstructor(string para0):myConstructor(para0, "einar")
{
  .....
But, it's been a while since I did this so I may be remembering incorrectly.

HTH,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform