Is there any way how to check if boolean array contains only true (or false) values or i need to check it value by value like this
for (int k = 0; k < 9; k++)
{
if (CheckPart[k] == false) Checked = false;
}
I know this is simple and works, but only for curiosity.
The following will return true if all elements are true, otherwise it will return false:
var Checked = CheckedPart.All(p => p);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With