How to call other constructors from a constructor in c#?

Posted by Blankman on Stack Overflow See other posts from Stack Overflow or by Blankman
Published on 2010-04-15T15:27:23Z Indexed on 2010/04/15 15:33 UTC
Read the original article Hit count: 169

Filed under:

I have a constructor like:

public Blah(string a, string b)
{

}

public Blah(string a, string b, string c)
{
  this.a =a;
  this.b =b;
  this.c =c;
}

How can I call the 2nd constructor from the 1st one?

like:

public Blah(string a, string b)
{
   Blah(a,b, "");
}

© Stack Overflow or respective owner

Related posts about c#