using System;
using System.Collections.Generic;
class Program
{
static void Main()
{
// Define the dictionary
Dictionary<string, int[,]> dict = new Dictionary<string, int[,]>();
// Add values to the dictionary
dict["matrix1"] = new int[,] { { 1, 2 }, { 3, 4 } };
dict["matrix2"] = new int[,] { { 5, 6 }, { 7, 8 } };
// Access values
int[,] matrix1 = dict["matrix1"];
int[,] matrix2 = dict["matrix2"];
// Print values of matrix1
for (int i = 0; i < matrix1.GetLength(0); i++) {
for (int j = 0; j < matrix1.GetLength(1); j++) {
Console.Write(matrix1[i, j] + " ");
}
Console.WriteLine();
}
// Access a specific element
int value = dict["matrix2"][1, 1];
Console.WriteLine("Element at [1,1] in matrix2 = " + value);
}
}
/*
run:
1 2
3 4
Element at [1,1] in matrix2 = 8
*/