title: How to remove only top node from Expression tree?
body: <p>my task is to modify an <code>Expression</code> according to several rules. One of them is to remove top level convert expression if there is such, but only top, not inner. I've implemented flowing class</p>
  
  <pre class="lang-cs prettyprint-override"><code>class RemoveConvertToObjectExpressionVisitor : ExpressionVisitor
  {
      protected override Expression VisitUnary(UnaryExpression node)
      {
          if (node.NodeType == ExpressionType.Convert || node.NodeType == ExpressionType.ConvertChecked)
          {
              return base.Visit(node.Operand);
          }
          return base.VisitUnary(node);
      }
  }
  </code></pre>
  
  <p>but it removes ALL convert expressions. See the example below (it is just a sample of a behavior, no much sense in the code itself).</p>
  
  <pre class="lang-cs prettyprint-override"><code>class Model
  {
      public int Value { get; set; }
  }
  
  void Main()
  {
      Expression&lt;Func&lt;Model, object&gt;&gt; expression = m =&gt; m.Value + int.Parse( ( (object) "5").ToString() );
  
      var visitor = new RemoveConvertToObjectExpressionVisitor();
  
      var result = visitor.Visit(expression.Body);
  }
  </code></pre>
  
  <p>I want the result expression to be <code>m.Value +  Parse(Convert("5").ToString())</code>, but it gives <code>m.Value + Parse("5".ToString())</code></p>