Suppose I have an array filled with Boolean values and I want to know how many of the elements are true.
private bool[] testArray = new bool[10] { true, false, t
Try something like this :
bool[] testArray = new bool[10] { true, false, true, true, false, true, true, true, false, false }; bool inVal = true; int i; i = testArray.Count(ai => ai == inVal);