public SearchResult Search(uint[] id) { if (id == null) { throw new ArgumentNullException("id"); } if (id.Length == 0) { throw new ArgumentException("numerical cannot be empty"); } IDefinition result = _root; int end = id.Length; for (int i = 0; i < id.Length; i++) { IDefinition temp = result.GetChildAt(id[i]); if (temp == null) { end = i; break; } result = temp; } var remaining = new List <uint>(); for (int j = end; j < id.Length; j++) { remaining.Add(id[j]); } return(new SearchResult(result, remaining.ToArray())); }