1

I have to make reference more that a hundred variables in if statements, I could just type them all out, but is there a way that i can combine two variables X and a number and use that to reference a variable? In other words can i use a string to reference a variable?

Man42
  • 11
  • 2

1 Answers1

0

Use Dictionary. Where key is a string: your variable name. And value is the value assigned to it.

Take a look at the answer to this: Create dynamic variable name

Community
  • 1
  • 1
Eternal Noob
  • 2,717
  • 5
  • 27
  • 41