/// <summary> /// Deep copy an expression /// </summary> /// <param name="exp"></param> /// <returns></returns> public static Expression CopyExpression(Expression exp) { Cloner cl = new Cloner(); return cl.CloneExpr(exp); }
private ExpressionTree _CopyTree() { var cl = new Cloner(); if (IsLeaf()) return new ExpressionTree(cl.CloneExpr(Data), null, null, null, Root); return new ExpressionTree(cl.CloneExpr(Data), null, LChild._CopyTree(), RChild?._CopyTree()); }