I'm trying to remove {}
in a nested for but for some reason it doesn't seem to work.
public void PrintBoard()
{
for (int i = 0; i < _matrix.N; i++)
{
for (int j = 0; j < _matrix.M; j++)
{
Console.Write(_matrix.Get[i, j]);
}
Console.WriteLine();
}
}
This is what I'm trying, but the output is kinda different, it seems that the line breaks doesn't work properly. I also would like to know why it's behaving like that.
public void PrintBoard()
{
for (int i = 0; i < _matrix.N; i++)
for (int j = 0; j < _matrix.M; j++)
Console.Write(_matrix.Get[i, j]);
Console.WriteLine();
}
// Output
// .........
// Output expected
// ...
// ...
// ...