title: How do I write my wrapper class to use partial generic type inference?
body: <p>This is related to <a href="https://stackoverflow.com/questions/2893698/partial-generic-type-inference-possible-in-c">this question</a>.</p>
  
  <p>I'd like to create a generic wrapper class:</p>
  
  <pre><code>public abstract class Wrapper&lt;T&gt;
  {
      internal protected T Wrapped { get; set; }
  }
  </code></pre>
  
  <p>With the following extensions:</p>
  
  <pre><code>public static class WrapperExtensions
  {
      public static W Wrap&lt;W,T&gt;(this T wrapped) where W:Wrapper&lt;T&gt;,new()
      {
          return new W {Wrapped = wrapped};
      }
  
      public static T Unwrap&lt;T&gt;(this Wrapper&lt;T&gt; w)
      {
          return w.Wrapped;
      }
  }
  </code></pre>
  
  <p>Now assume a concrete Wrapper:</p>
  
  <pre><code>public class MyIntWrapper : Wrapper&lt;int&gt;
  {
      public override string ToString()
      {
          return "I am wrapping an integer with value " + Wrapped;
      }
  }
  </code></pre>
  
  <p>I would like to call the <code>Wrap</code> extension like this:</p>
  
  <pre><code>MyIntWrapper wrapped = 42.Wrap&lt;MyIntWrapper&gt;(); 
  </code></pre>
  
  <p>This is not possible because in c# we need to provide both type arguments to the <code>Wrap</code> extension.
  (it's all or nothing)</p>
  
  <p>Apparently partial inference is possible in F#. </p>
  
  <p>How would the above code look in F#?</p>
  
  <p>Would it be possible to use it from C#?</p>