How to change Cursor position in Console?

后端 未结 3 1865
南方客
南方客 2021-01-28 23:34

I wanted to use Console.ReadLine(); in the previous line and make it display like that:

HeresomeText>(input)

Not like



        
3条回答
  •  猫巷女王i
    2021-01-29 00:01

    Absolutely - look at the various members of the System.Console class.

    In particular, you want the SetCursorPosition method, but if you're writing a "fancy" console app you should think about the members for using colours etc too.

提交回复
热议问题