I don’t know if this is correct or not, but each element works:
bool[,] a = new bool[4,4]
{
{true, true, true, true},
{true, true, false, true},
{true, true, true, true},
{true, true, true, true},
};
if(a.Cast<bool>().Contains(false))
{
Console.Write("Contains false");
}
source
share