Tuple<int, int>[,] int2DArray = new Tuple<int, int>[2, 3];//creating an array of capacity 2,3
//Pushing data to the 2D Rectangular Array
for (int row = 0; row < 2; row++)
{
for (int col = 0; col < 3; col++)
{
int2DArray[row,col] = Tuple.Create((row+1),(col+1));
}
}
//Accessing data from the 2D Rectangular Array
for (int row = 0; row < 2; row++)
{
for (int col = 0; col < 3; col++)
{
Console.WriteLine($"Element at row {row} is {int2DArray[row, col].Item1} and col {col} is {int2DArray[row, col].Item2} ");
}
}