You need to save the cursor position before you start, and
set it[
^] before you write the message:
int left = Console.CursorLeft;
int top = Console.CursorTop;
videoDownloader.DownloadProgressChanged += (sender, args) =>
{
Console.SetCursorPosition(left, top);
Console.Write("Downloaded Percentage: {0}", args.ProgressPercentage);
};
(There's no need to call string.Format
when writing to the console; both Write
and WriteLine
have overloads which accept a composite format string and arguments.)