title: How to instantiate a class with parameterless constructor and second constructor with optional arguments using the second constructor?
body: <p>I am using a 3rd party SDK that has a class with multiple constructors. It has a parameterless constructor, and has another constructor with all of it's properties set to default values (AKA optional arguments). Here's an example:</p>
  
  <pre class="lang-cs prettyprint-override"><code>    public class MyClass
      {
          public MyClass() { }
  
          public MyClass(int i = 1) { }
      }
  </code></pre>
  
  <p>It appears to me that if I create an instance of this class via <code>new MyClass()</code> it will simply use the parameterless constructor. So how/why on earth could I ever call the one with the optional arguments?</p>
  
  <p>The annoying thing is, the second one does additional setup of the class that I need to invoke, but I don't need to change the default value of the argument. So it seems my only option is to just hardcode the value of the first argument to be what is marked as the default value, just so I can use that constructor. i.e. In my simple example above, I am forced to do <code>new MyClass(1)</code>. </p>
  
  <p>This is kind of just a rant about a poorly designed SDK. But I thought I would toss this out there to see if you guys knew of anything extra I could do to call the 2nd ctor without hardcoding to the same default value.</p>