public void AddString(string str) { if (str == "") { children.Add(new SearchTreeNode('\0')); } else { var child = children.FirstOrDefault(x => x.Character == str[0]); if (child == null) { child = new SearchTreeNode(str[0]); children.Add(child); } child.AddString(str.Substring(1)); } }
public void AddChild(SearchTreeNode child) { children.Add(child); }