public IntHierarchy getUnswerPosition(List <Subject> subjects, int selectedUnswerId) { for (int i = 0; i < subjects.Count; i++) { try { IntHierarchy hi = new IntHierarchy(new Subject().GetType(), subjects.ElementAt(i).searchObjectIndex(selectedUnswerId)); hi.value = i; return(hi); } catch (GoTestObjectNotFound ex) { } } throw new GoTestObjectNotFound(); }
public IntHierarchy(Type type, IntHierarchy child) { this.type = type; this.child = child; }