private IBinaryTreeNode <T> FindWithParent(T item, out IBinaryTreeNode <T> parent) { IBinaryTreeNode <T> current = _head; parent = null; while (current != null) { var res = current.CompareTo(item); if (res > 0) { parent = current; current = current.Left; } else if (res < 0) { parent = current; current = current.Right; } else { break; } } return(current); }