Tree Related Programs in C#