title: Execute method with Action<T> argument using Reflection
body: <p>How can i create a Action method to use as a argument to the following function?</p>
  
  <pre><code>public void When(Action&lt;T&gt; action) 
  {
      if (internalValue != null)
          action(internalValue);
  }
  </code></pre>
  
  <p>I have the MethodInfo on the method, and the parameter type like so:</p>
  
  <pre><code>var methods = value.GetType().GetMethods();
  MethodInfo mInfo = methods.First(method =&gt; method.Name == "When");
  Type parameterType = (mInfo.GetParameters()[0]).ParameterType;
  </code></pre>
  
  <p>But after that i have no idea how to make the actual Action method to pass as argument, i also do not know how to define the Action method body.</p>