© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
20 replies
kyo

❔ User inputs & arrays.

I am having the user input a max amount of values to store and using that input as my array length.
I am then having the user input that amount of values individually.
EX: User inputs 5, then inputs 1, 2, 3, 4, 5

I am trying to limit the amount of inputs to the max value inputted by the user.

Everything I have tried so far allows the user to input more than the max amount they specified and I get Out of Range error.

Anyone have a link to some documentation or some advice?
I would prefer not to be outright told the answer.
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

✅ arrays
C#CC# / help
3mo ago
Arrays
C#CC# / help
4y ago