private int GetHighestChildEndLine() { int end = 0; foreach (var child in Children) { if (child.EndLine > end) end = child.EndLine; } return end; }