// taken from http://www.danielmoth.com/Blog using System; public class Tree { public Tree Left = null; public Tree Righ = null; public int Data = 0; // 1 // 2 2 // 3 3 3 3 //4 4 4 4 4 4 4 4 internal static Tree CreateSomeTree(int depth, int start) { Tree root = new Tree(); root.Data = start; if (depth > 0) { root.Left = CreateSomeTree(depth - 1, start + 1); root.Righ = CreateSomeTree(depth - 1, start + 1); } return root; } }