title: The type arguments for method … cannot be inferred from the usage. Try specifying the type arguments explicitly
body: <p>I'm not sure, why calling <code>Map2</code> gives me</p>
  
  <blockquote>
    <p>The type arguments for method 'Program.Map2(object,
    Func)' cannot be inferred from the usage. Try specifying the
    type arguments explicitly.</p>
  </blockquote>
  
  <p>Here is the code...</p>
  
  <pre><code>void Test()
  {
      var test1 = Map1(1, MapIntToString);
      var test2 = Map2(1, MapIntToString);
  }
  
  To Map1&lt;From, To&gt;(From value, Func&lt;From, To&gt; mapFunc) =&gt; mapFunc(value);
  To Map2&lt;From, To&gt;(object value, Func&lt;From, To&gt; mapFunc) =&gt; mapFunc((From)value);
  
  string MapIntToString(int value) =&gt; Convert.ToString(value);
  </code></pre>
  
  <p>This is very simplified example. I need to convert some lists of DTOs to Models (and back), but it should be same case...</p>