I'm already aware of the loop example below
bool[] switches = new bool[20];
for (int i = 0; i < switches.Length; i++) { switches[i] = false; }
But is there a more efficient way to set the entire array to false?
To explain myself a bit, i'm not, like the example above, setting a new bool array to false as it would already be false anyway. In my case i'm reading a large portion of a process memory which could fire about 18724 times at most as it is searching for patterns. When it determines that the current bytes doesn't contain the pattern, it sets the entire bool array to false along with a few other things then reads the next memory block and restarts the loop.
Although its more out of curiosity that I asked this question because the whole process still takes less than a second.
So again, my question is, is there a better way to set the entire bool array to false?