title: Func<> with unknown number of parameters
body: <p>Consider the following pseudo code:</p>
  
  <pre><code>TResult Foo&lt;TResult&gt;(Func&lt;T1, T2,...,Tn, TResult&gt; f, params object[] args)
  {
      TResult result = f(args);
      return result;
  }
  </code></pre>
  
  <p>The function accepts <code>Func&lt;&gt;</code> with unknown number of generic parameters and a list of the corresponding arguments. Is it possible to write it in C#? How to define and call <code>Foo</code>? How do I pass <code>args</code> to <code>f</code>?</p>