public override string ToString() { var stringBuilder = new StringBuilder(); for (var i = 0; i < SudokuBoard?.GetLength(0); i++) { for (var j = 0; j < SudokuBoard?.GetLength(1); j++) { if (SudokuBoard[i, j].HasValue) { stringBuilder.Append($"{SudokuBoard[i, j].Value}|"); } else { stringBuilder.Append(" |"); } } stringBuilder.AppendLine(); } return(stringBuilder.ToString()); }