Appel d'un constructeur à partir du corps de l'autre en C#

J'ai besoin d'appeler un constructeur à partir du corps d'un autre. Comment puis-je le faire?

Fondamentalement

class foo {
    public foo (int x, int y)
    {
    }

    public foo (string s)
    {
        //... do something

        //Call another constructor
        this (x, y); //Doesn't work
        foo (x, y); //neither
    }
}
  • Comment un constructeur comme les foo (int x, int y , string s)
InformationsquelleAutor tom | 2011-09-27