title: How do I build an expression with a certain signature?
body: <p>I'm trying to call a method with a parameter of type <code>Expression&lt;Func&lt;T, string&gt;&gt;</code> but the expression tree that I build doesn't allow me to call the method. Here's a short but complete program demonstrating the problem:</p>
  
  <pre><code>using System;
  using System.Linq.Expressions;
  
  public class Test
  {
      public string Name { get { return ""; } }
  
      public static void Main()
      {
          Foo&lt;Test&gt;();
      }
  
      static void Foo&lt;T&gt;()
      {
          var parameter = Expression.Parameter(typeof(T), "t");
          var property = Expression.Property(parameter, "Name");
          var lambda = Expression.Lambda(property, parameter);
          Bar&lt;T&gt;(lambda);
      }
  
      static void Bar&lt;T&gt;(Expression&lt;Func&lt;T, string&gt;&gt; expression) {}
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>error CS1503: Argument 1: cannot convert from
  'System.Linq.Expressions.LambdaExpression' to 
  'System.Linq.Expressions.Expression&lt;System.Func&lt;T, string&gt;&gt;'
  </code></pre>
  
  <p>How can I pass my expression tree to the method?</p>