c# - Equivalent of fflush(stdout)? -
i have long loop, prints out many lines of information. maintain 1 line overwrites previous lines. tried console.out.flush() not seem work.
use
console.setcursorposition
to cursor @ use
console.cursorleft console.cursortop
example
int = 0; console.writeline("numbers count below line"); int cleft = console.cursorleft; int ctop = console.cursortop; while (true) { console.setcursorposition(cleft, ctop); console.writeline(i); i++; }
c# console fflush
No comments:
Post a Comment