© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
7 replies
cipro

❔ reverse of RemoveAt[index]

hi, so my problem is that im itterating through a list of 10 questions, and each time the user has completed a question from the list, i use thed the RemoveAt(index) function so that the same question isnt repeated. the problem is that at the end of the program, the user is asked if they want to repeat the exercise and if they click yes lets say, then the questions they have already completed will still be removed, as in the program will crash once it itterates past the first and final index. i forgot to mention that the user will only be asked 5 questions so that the program doesnt crash by itterating further than the final and initial index. so how can i counter this problem so that when the user is done and they press yes to retry, the indexes are reset?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Reverse order of ListView
C#CC# / help
4y ago
❔ System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
C#CC# / help
3y ago
❔ System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
C#CC# / help
3y ago
System.IndexOutOfRangeException: "The index was out of range of the array." c# ReadWriteMemory
C#CC# / help
3y ago