title: Calling a function using reflection that has a "params" parameter (MethodBase)
body: <p>I have MethodBases for two functions:</p>
  
  <pre><code>public static int Add(params int[] parameters) { /* ... */ }
  public static int Add(int a, int b) { /* ... */ }
  </code></pre>
  
  <p>I have a function that calls the MethodBases via a class I made:</p>
  
  <pre><code>MethodBase Method;
  object Target;
  public object call(params object[] input)
  {
      return Method.Invoke(Target, input);
  }
  </code></pre>
  
  <p>Now if I <code>AddTwoMethod.call(5, 4);</code> it works fine.</p>
  
  <p>If I however use <code>AddMethod.call(5, 4);</code> it returns:</p>
  
  <blockquote>
    <p>Unhandled Exception: System.Reflection.TargetParameterCountException: parameters do not match signature</p>
  </blockquote>
  
  <p>Is there any way to make it so that both calls work fine without need for manually putting the arguments in an array for the <code>params int[]</code>?</p>