I am writing a console program in C#.
Is there a way I can use a Console.Clear() to only clear certain things on the console screen?
Here\'s my issue:
<
You could use a custom method to clear parts of the screen...
static void Clear(int x, int y, int width, int height)
{
int curTop = Console.CursorTop;
int curLeft = Console.CursorLeft;
for (; height > 0;)
{
Console.SetCursorPosition(x, y + --height);
Console.Write(new string(' ',width));
}
Console.SetCursorPosition(curLeft, curTop);
}