How to modify the previous line of console text?

前端 未结 3 745
渐次进展
渐次进展 2020-12-05 09:57

I\'d like to achieve something like this:

Time consuming operation...OK
Another time consuming operation...
And another one, but it completed, so...OK
         


        
3条回答
  •  Happy的楠姐
    2020-12-05 10:38

    You can move cursor wherever you want: Console.SetCursorPosition or use Console.CursorTop.

    Console.SetCursorPosition(0, Console.CursorTop -1);
    Console.WriteLine("Over previous line!!!");
    

提交回复
热议问题