public static RandomMatrixGenerator GetInstance() { if (instance == null) { instance = new RandomMatrixGenerator(); } return(instance); }
static void Main(string[] args) { int numberOfRows = 5; int numberOfColumns = 3; double[][] matrix = RandomMatrixGenerator.GetInstance().GenerateRandomMatrix(numberOfRows, numberOfColumns); for (int i = 0; i < numberOfRows; i++) { for (int j = 0; j < numberOfColumns; j++) { Console.Write(matrix[i][j].ToString() + "\t"); } Console.WriteLine(); } }