title: Get property type by MemberExpression
body: <p>I ask similar question <a href="https://stackoverflow.com/questions/10222783/get-property-name-and-type-by-pass-it-directly">here</a>
  , assume this type:</p>
  
  <pre><code> public class Product {
  
  public string Name { get; set; }
  public string Title { get; set; }
  public string Category { get; set; }
  public bool IsAllowed { get; set; }
  
  }
  </code></pre>
  
  <p>and this one that use <code>MemberExpression</code> :</p>
  
  <pre><code>public class HelperClass&lt;T&gt; {
  
      public static void Property&lt;TProp&gt;(Expression&lt;Func&lt;T, TProp&gt;&gt; expression) {
  
          var body = expression.Body as MemberExpression;
  
          if(body == null) throw new ArgumentException("'expression' should be a member expression");
  
          string propName = body.Member.Name;
          Type proptype = null;
  
      }
  
  }
  </code></pre>
  
  <p>I use it like this:</p>
  
  <pre><code>HelperClass&lt;Product&gt;.Property(p =&gt; p.IsAllowed);
  </code></pre>
  
  <p>in <code>HelperClass</code> I just need property name(in this example <code>IsAllowed</code>) and property type (in this example <code>Boolean</code>) So I can get property name but I can't get property type. I see the property type in debugging as following picture shown:</p>
  
  <p><img src="https://i.stack.imgur.com/N9aFv.png" alt="enter image description here"></p>
  
  <p>So what is your suggestion to get property type?</p>