It looks like you might be using HashSet<T>
for the wrong purpose.
Sets are designed for:
- Ensuring uniqueness
- The ability to extract all members when needed
- Checking whether a supplied item is already a member
HashSet<T>
does the above things, and it does them very fast. But that's pretty much all it does.
Sets are not ordered, so trying to get the nth value doesn't really have any meaning or use.
For what you're doing (O(1) access by numbered item offset), List<T>
will do perfectly well.
This answer here gives a more detailed description of what HashSet<T>
is for.