title: Get parameter values from method at run time
body: <p>I have the current method example:</p>
  
  <pre><code>public void MethodName(string param1,int param2)
  {
      object[] obj = new object[] { (object) param1, (object) param2 };
      //Code to that uses this array to invoke dynamic methods
  }
  </code></pre>
  
  <p>Is there a dynamic way (I am guessing using reflection) that will get the current executing method parameter values and place them in a object array? I have read that you can get parameter information using MethodBase and MethodInfo but those only have information about the parameter and not the value it self which is what I need.</p>
  
  <p>So for example if I pass "test" and 1 as method parameters without coding for the specific parameters can I get a object array with two indexes { "test", 1 }?</p>
  
  <p>I would really like to not have to use a third party API, but if it has source code for that API then I will accept that as an answer as long as its not a huge API and there is no simple way to do it without this API.</p>
  
  <p>I am sure there must be a way, maybe using the stack, who knows. You guys are the experts and that is why I come here.</p>
  
  <p>Thank you in advance, I can't wait to see how this is done.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It may not be clear so here some extra information. This code example is just that, an example to show what I want. It would be to bloated and big to show the actual code where it is needed but the question is how to get the array without manually creating one. I need to some how get the values and place them in a array without coding the specific parameters.</p>