title: Get Parameters from Action<T>
body: <p>How do I get the parameters passed into an <code>Action&lt;T&gt;</code> ? The code example should highlight what I'm trying to achieve. Sorry that it's a little bit long.</p>
  <pre><code>public class Program
  {
      public static void Main(string[] args)
      {
          var foo = new Foo();
          foo.GetParams(x =&gt; x.Bar(7, &quot;hello&quot;));
      }
  }
  
  public class Foo
  {
      public void Bar(int val, string thing) { }
  }
  
  public static class Ex
  {
      public static object[] GetParams&lt;T&gt;(this T obj, Action&lt;T&gt; action)
      {
          // Return new object[] { 7, &quot;hello&quot; }
      }
  }
  </code></pre>
  <p>The only options that look vaguely useful are GetInvocationList(), Method and Target. But none of them seem to contain the data I'm after (I think it's because of the way I've declared the Action). Thanks</p>
  <p>EDIT: It's not the types I want, it's the actual values - as noted in the commented bit of code.</p>