C#. Clear console output from {X} line -


i'm trying deal problem related console's output. want keep first line, clear remaining output.

i found link: clearconsoleline it's not ...

so, there function allow me giving line number(in case line 0) clear rest of output?

edit: concerning 1 of comments, workaround of course used, current state:

        console.clear();         console.writeline("current word document: {0}", docpath); //line want keep first line 

thank you.

if not wish use loop in other post, create own "clear" function printing insane amounts of spaces in single line, , bring cursor back. it's not visually striking in compiler, can hide @ bottom, , takes 2 commands vs loop.

static void main(string[] args)     {         (int = 0; < 20; i++) console.writeline("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");         eraser();         console.readline();     }      static void eraser()     {         console.setcursorposition(0, 1);         console.writeline(" [' 'x2000] "); //i'm not going write spaces sake of post         console.setcursorposition(0, 1);                                                                                                       } 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -