public int GetFirstAfter(int index) { for (int i = 0; i < positions.Count; i++) { if (positions[i] > index) { return positions[i]; } } return -1; }