First time on stackOverflow, so this might be a really nooby question, but i was wondering if i could change multiple variable values at the same time without having to write out every single one.
Here is my code at the moment:
public string Label1Text()
{
int index;
for (index = 0; index < 32; index++)
{
if (seatChosen[index])
{
_bookedSeats += "A" + (index + 1) + " ";
Properties.Settings.Default.A1 = true;
}
}
string text = _bookedSeats + ".";
//debug
label1.Text = text;
return text;
}
The line
Properties.Settings.Default.A1 = true;
is what i want to change to something like this (theoretical code)
Properties.Settings.Default.A[index] = true;
or
Properties.Settings.Default.A + index = true;
I hope you can understand what I'm trying to accomplish.