[Solved] C# Read int numbers to array [closed]

Instead of using str.Read() which would require you to read single characters (or a buffer that you specified), try using str.Readline() to read a single line for each iteration of i. public void readFromFile() { StreamReader str = new StreamReader(“SUDOKU.txt”); for (int i = 0; i < 9; ++i) { string[] lineNumbers = str.ReadLine().Split(‘ ‘); … Read more

[Solved] Draw samurai sudoku grid on WPF

Example for demonstration. It is not as difficult as in the picture in the question. But it will not be a problem for you to supplement it. public class SudokuCell { public Thickness Border { get; } public int Value { get; set; } public int Row { get; } public int Column { get; … Read more

[Solved] C# Sudoku Board Generator [closed]

Something like this will provide a basic console output of your board. foreach (var cell in board.Cells) { int x = cell.Column; int y = cell.Row; Console.SetCursorPosition(x * 2, y * 2); Console.Write(cell.Value.HasValue ? cell.Value.Value.ToString() : ” “); } Console.ReadKey(); I’m multiplying the X and Y by 2 for the purpose of separating the numbers, … Read more