I have a problem with a console project of C#. I want to use the whole console screen to write text in it. Meaning, for example, to "draw" a border along the border of the console. The problem is the unnecessary last character in the last line. How can I prevent it?
For a better understanding, I've added a picture of the unwanted character.
I draw it by filling a two dimensional array of chars and dumping it with the following method. yMax is the height and xMax the width of the console window.
private void DumpCharacters()
{
for (int y = 0; y < yMax - 1; y++)
{
string line = string.Empty;
for (int x = 0; x < xMax; x++)
{
line += characters[x, y];
}
Console.SetCursorPosition(0, y);
Console.Write(line);
}
}
I already tried to increase the height of the border, but then, the mentioned character overwrites the border at that position.
EDIT: Sorry for my unclear explanation. Of course I meant, like Attila Bujáki said, the jump to the last line. Is it possible to prevent this?
╝
and it should be fine. – Warlord