public int GetOccurrence(int occurrence) { if (occurrence - 1 >= positions.Count) { return -1; } return positions[occurrence - 1]; }