public static MatrixGenerator GetInstance() { if (instance == null) { instance = new MatrixGenerator(); } return(instance); }
static void Main() { MatrixGenerator mg = MatrixGenerator.GetInstance(); double[][] matrix = mg.GenerateMatrix(5, 6); foreach (double[] row in matrix) { foreach (double elem in row) { System.Console.Write(elem + " "); } System.Console.WriteLine(); } }