I have a tree data structure, comprised of nodes, that I need to parse into an expression tree. My nodes look like this (simplified):
public class Node
{
public Node Left { get; set; }
public Node Right { get; set; }
public Operation OperationType { get; set; }
public object Value { get; set; }
}
What is the best / correct way to find the bottom of the tree and work backwards building up the expression tree? Do you parse left or right first?