C# Convert string to name of bool variable -


i trying make that:

    // int counter; - changing in ther other parts of program     bool abc1; bool abc2; bool abc3; bool abc4;      if("abc" + counter == true)     {      //some code     } 

anyway, need convert string , int bool name. how can this?

use array instead:

bool[] abc;  // ...  if (abc[counter] == true) { {     // code. } 

Comments