title: Call F# function from C# passing function as a parameter
body: <p>I have the following F# function</p>
  
  <pre><code>let Fetch logger id = 
      logger "string1" "string2"
      // search a database with the id and return a result
  </code></pre>
  
  <p>In my C# class I want to call the <em>Fetch</em> F# function mocking out the <em>logger</em> function.
  So I have the following C# function as the mocker.</p>
  
  <pre><code>void Print(string x, string y) { // do nothing }
  </code></pre>
  
  <p>I'm trying to call the F# function from a C# class with the following.</p>
  
  <pre><code>var _logger = FuncConvert.ToFSharpFunc&lt;string, string&gt;(Print);
  var _result = Fetch(logger, 3);
  </code></pre>
  
  <p>The problem with FuncConvert.ToFSharpFunc is that takes only one type argument.
  When I change the <em>Fetch</em> F# logger function to the following it works fine when I use ToFSharpFunc(Print) where the C# Print function also takes in one string.</p>
  
  <pre><code>let Fetch logger id = 
      logger "string1"
      // search a database with the id and return a result
  </code></pre>
  
  <p>Anyone got ideas?</p>