title: Different ways to parse / visit Expressions when traversing
body: <p>I have a basic question about parsing expression trees.</p>
  
  <p>Is there a difference between using if statements to determine the NodeType of an expression, and handling it accordingly, versus dispatching the expression do a different Visitor method? </p>
  
  <p>Also is this even the correct way to dispatch:</p>
  
  <pre><code>    protected override Expression VisitMember(MemberExpression m)
      {
          if (m.Expression.NodeType == ExpressionType.Constant)
          {
               Expression e = (m.Expression as ConstantExpression); 
  
               this.Visit(e); // dispatches to VisitConstant() ?
          }
  
      }
  </code></pre>
  
  <p>Versus:</p>
  
  <pre><code>    protected override Expression VisitMember(MemberExpression m)
      {
          if (m.Expression.NodeType == ExpressionType.Constant)
          {
               //specific code to handle constant
          }
      }
  </code></pre>
  
  <p>By the way this is in reference to parsing the following:</p>
  
  <pre><code>dbContext.Products.Where(x =&gt; x.ID == user.ProductID).AsEnumerable()
  // user.FooID is 'MemberExpression' 
  </code></pre>
  
  <p>What exactly is the relationship between NodeType and simply the Type of the Expression? Ive noticed for instance there are are NodeTypes which dont seem to have overridable visitor methods, is that correct?</p>