Okay, I have this piece of code:
int arrPanelsRequired = 4;
string airport;
int arrPanelsMade = 0;
for (; arrPanelsMade <= arrPanelsRequired; arrPanelsMade++)
{
Panel arrPanelXXX = new Panel();
and I need to replace the XXX with the value of arrPanelsMade. I found several ways to name an object after a variable’s value, however, I wasn’t able to apply any of them here 🙁
I don’t think it would be a good idea in general, let alone in C#. I can see many
arrprefixes, which leads me to the use of an array. I think you might be looking for something like this: