title: C#: if a class has two constructors, what is the best way for these constructors to share some code?
body: <p>C# in VS2005: if a class has two constructors, what is the best way for these constructors to share some code?</p>
  
  <p>eg.  How could I avoid having the <code>x = 5</code> and <code>y = 10</code> lines in both constructors for the following:</p>
  
  <pre><code>public class MyObject {
  
  int x;
  int y;
  int z;
  
  public MyObject() {
      x = 5;
      y = 10;
  }
  
  public MyObject(int setZ) {
      x = 5;
      y = 10;
      z = setZ;
  }
  </code></pre>