Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Constructor overloading
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Constructor overloading
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01226186
Message ID:
01226186
Vues:
67
Can I do something similar to this:
class MyClass
{
  public MyClass(int age)
  {
    MyClass(age, true);
  }
 
  public MyClass(int age, bool alive)
  {
    // do stuff
  }
}
This doesn't compile but I think my intentions are clear.
I am having a hard time thinking clear any help would be appreciated.

Thanks,
Einar
Semper ubi sub ubi.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform