title: Is there any way to implement this type hierarchy using the new co/contravariance in C# 4?
body: <p>Suppose I have a handle class like:</p>
  
  <pre><code>interface IHasHandle&lt;TObject&gt; {
       IHandle&lt;TObject&gt; Handle { get; }
  }
  
  interface IHandle&lt;out TObject&gt; {
       TObject Value { get; }
  }
  </code></pre>
  
  <p>I would like to the use this class to give me the <em>most</em> derived output type in a hierarchy. What I have now looks like:</p>
  
  <pre><code>interface IAnimal : IHasHandle&lt;IAnimal&gt; { ... }
  
  interface IMammal : IAnimal, IHasHandle&lt;IMammal&gt; { ... }
  
  interface IFeline : IMammal, IHasHandle&lt;IFeline&gt; { ... }
  
  class Tiger : IFeline {
       IHandle&lt;IAnimal&gt; IHasHandle&lt;IAnimal&gt;.Handle { get { ... } }
       IHandle&lt;IMammal&gt; IHasHandle&lt;IMammal&gt;.Handle { get { ... } }
       IHandle&lt;IFeline&gt; IHasHandle&lt;IFeline&gt;.Handle { get { ... } }
       public IHandle&lt;Tiger&gt;   Handle { get { ... } }
  }
  </code></pre>
  
  <p>This means that when I have an IAnimal, I can always get IHandle, when I have IMammal, I can get IHandle, etc.</p>
  
  <p>Does anyone have any general comments on this structure or ideas for how to avoid having every possible implementation?</p>