+ 2
How to assign many values to only one integer variable in c#?
I wanna put many value on one integer variable and I don’t know how. My ultimate goal is to create a int variable that equals everything between 0 and 20 but not the value of x that can change between 0 and 20. I hope you understand.
2 ответов
+ 3
You can't assign multiple values to one int, however you could create and array or list of ints to store the range. This allow you to access each by index in the same variable. Then handle x as required.
0
you can't do that. think of a variable as a box you store data in.