title: Get MethodInfo for a lambda expression
body: <p>I know I am asking the bizarre but just for kicks, is it possible to get the <code>MethodInfo</code> for a lambda expression?</p>
  
  <p>I am after something like this:</p>
  
  <p><code>(Func&lt;int, string&gt;(i =&gt; i.ToString())).MethodInfo</code></p>
  
  <p><strong>UPDATE</strong>
  I want to get the method info regardless of whether the body of the lamda is a method call expression or not, i.e. regardless of what type of expression the body of the lambda is.</p>
  
  <p>So, for e.g.</p>
  
  <p>This might work.</p>
  
  <pre><code>var intExpression = Expression.Constant(2);
  Expression&lt;Func&lt;int, Dog&gt;&gt; conversionExpression = i =&gt; Program.GetNewDog(i);
  
  var convertExpression5 = Expression.ConvertChecked(intExpression, typeof(Dog), ((MethodCallExpression)(conversionExpression.Body)).Method);
  
  class Program
  {
    static Dog GetNewDog(int i)
    {
      return new Dog();
    }
  }
  </code></pre>
  
  <p>But I want even this to work:</p>
  
  <pre><code>var intExpression = Expression.Constant(2);
  Expression&lt;Func&lt;int, Dog&gt;&gt; conversionExpression = i =&gt; new Dog();
  
  var convertExpression5 = Expression.ConvertChecked(intExpression, typeof(Dog), /*...???... */);
  </code></pre>