title: c# pass a list as parameter function
body: <p>"Hey, use a list of parameters or use param", but the problem doesn't come from there.
  I have functions which take no parameter, one or many integers, ... the user enter the name of a function and a list of parameters and i want to call the function and give the list to it.
  For exemple :</p>
  
  <pre><code>//void AddUser(int32 age, String name)
  List&lt;dynamic&gt; UserList = new List&lt;dynamic&gt;();
  UserList.Add(42); UserList.Add("toto");
  String FunctionEntered = "AddPerson";
  
  MyFramwork.Call(FunctionEntered, UserList);
  //gives UserList(List)
  </code></pre>
  
  <p>And i can't modify the function entered to allow it to take a List of dynamic values as parameters. So i need a solution to call a function (i don't know the number of parameters) and use the index 1,2,... of a list as the first, second, ... parameter.</p>
  
  <p>Thanks.</p>
  
  <p>PS : don't worry, my framework allows me to call an unknown function just using it's name.</p>
  
  <p>Edit : I'll try to clarify, I have a List and i want to call a function with this list as parameter but the function that i want to call don't take Lists as parameter (and i can't modify the function).
  For exemple I want to use List{a, b} as parameter of Sum(int a, int b) but I can't modify the function so i can't remplace the function by Sum(int[] ab) or Sum(List ab) and the number of arguments are variable so I can't call : Sum(myList[0], myList[1]).</p>