if we have a 1D array, we could use the following to see if all elements are equal to 3:
int[] t = Enumerable.Repeat(3, 10).ToArray();
if (t.All(item => item.Equals(3))) MessageBox.Show("all elements equals to 3");
but if I have a 2D-array, how could I check if all elements are equal to 3 ( without any for-Loops ):
int[,] t2D= new int[,] { { 3, 3 }, { 3, 3 }, { 3, 3 }, { 3, 3 } };
if( CHECK IF ALL ELEMENTS IN **t2D** are equal to 3)
{
MessageBox.Show("all elements equals to 3");
}
What should I put in If-statement?