title: Why is my method expecting the wrong return type?
body: <p>I have a method that is defined to receive two parameters. One is a generic type, the other is a function with a generic return type:</p>
  
  <pre><code>public class MyHelperClass&lt;TRequest, TResponse&gt;
  {
     public TResponse Execute(TRequest request, Func&lt;IDataRecord, TResponse&gt; builder){ ... }
  }
  </code></pre>
  
  <p>Then I have an object that has a method I want to pass in as a delegate</p>
  
  <pre><code>public class MyObject
  {
     public TResponse BuildMe(IDataRecord rdr){ ... }
  }
  
  //call like this
  MyHelperClass.Execute(input, myObjectInstance.BuildMe);
  </code></pre>
  
  <p>but I get an error stating:</p>
  
  <p>"Expected a method with 'TRequest BuildResponse(IDataRecord)'</p>
  
  <p>why is it expecting a TRequest as a return instead of a TResponse??</p>
  
  <p><img src="https://i.stack.imgur.com/VmsQr.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/3edNN.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Umth5.png" alt="enter image description here"></p>