title: Generic class with generic constructor?
body: <p>I have a generic class. The constructor needs to accept an argument that is another instance of the same class. The problem is that the other instance can have a different generics type.</p>
  
  <p>Looks like C# allows me to have a method with it's own generics type, but this doesn't appear allowed for the constructor.</p>
  
  <pre><code>public class MyClass&lt;T&gt;
  {
      public MyClass&lt;T2&gt;(MyClass&lt;T2&gt; parent = null)
      {
      }
  
      // ... Additional stuff
  }
  </code></pre>
  
  <p>The code above tells me <code>T2</code> is undefined. It doesn't accept it as a method type.</p>
  
  <p>One approach would be to add a second generic type to my class. But this is awkward and, in many cases, the argument will be <code>null</code> and there is not type.</p>
  
  <p>Does anyone see a simple way around this?</p>