public static string NewTermName(Template template) { //TODO: new name should be of the form "New Complex List" or "New Complex List (x)" where x >= 2 string baseNewName = "New Complex List"; string newName = baseNewName; int termNameSuffixIndex = 2; while (template.FindComplexList(newName) != null) newName = string.Format("{0} ({1})", baseNewName, termNameSuffixIndex++); return newName; }