title: Can I have a variable number of generic parameters?
body: <p>In my project I have the following three interfaces, which are implemented by classes that manage merging of a variety of business objects that have different structures.</p>
  
  <pre><code>public interface IMerger&lt;TSource, TDestination&gt;
  {
      TDestination Merge(TSource source, TDestination destination);
  }
  
  public interface ITwoWayMerger&lt;TSource1, TSource2, TDestination&gt;
  {
      TDestination Merge(TSource1 source1, TSource2 source2, TDestination destination);
  }
  
  public interface IThreeWayMerger&lt;TSource1, TSource2, TSource3, TDestination&gt;
  {
      TDestination Merge(TSource1 source1, TSource2 source2, TSource3 source3, TDestination destination);
  }
  </code></pre>
  
  <p>This works well, but I would rather have one <code>IMerger</code> interface which specifies a variable number of <code>TSource</code> parameters, something like this (example below uses <code>params</code>; I know this is not valid C#):</p>
  
  <pre><code>public interface IMerger&lt;params TSources, TDestination&gt;
  {
      TDestination Merge(params TSource sources, TDestination destination);
  }
  </code></pre>
  
  <p>It there any way to achieve this, or something functionally equivalent?</p>