title: Is there any way in c# to have Type which includes itself?
body: <p>One way to code what I want is the following, but I don't really like the new hiding</p>
  
  <pre><code>public class Bar
  {
      public TReturn Baz&lt;TReturn&gt;()
        where TReturn : Bar
      {
          return this as TReturn;
      }
  }
  
  public class Foo : Bar
  {
      public new TReturn Baz&lt;TReturn&gt;()
        where TReturn : Foo
      {
          return base.Baz&lt;TReturn&gt;() as TReturn;
      }
  }
  
  class Test
  {
      public void Main()
      {
        var foo = new Foo();
        var foo2 = foo.Baz&lt;Foo&gt;();
        Assert.IsInstanceOfType(foo.GetType(), foo2);
      }
  }
  </code></pre>
  
  <p>Instead I want to know if a generic Type can include itself? Something like the following.</p>
  
  <pre><code>public class Bar&lt;TReturn&gt;
      where TReturn : Bar&lt;TReturn&gt;
  {
      public TReturn Baz()
      {
          return this as TReturn;
      }
  }
  
  public class Foo&lt;TReturn&gt; : 
      Bar&lt;TReturn&gt;
      where TReturn : Bar&lt;TReturn&gt;
  {
  }
  
  class Test
  {
      public void Main()
      {
        var foo = new Foo&lt;???&gt;();
        var foo2 = foo.Baz();
        Assert.IsInstanceOfType(foo.GetType(), foo2);
      }
  }
  </code></pre>