How to change Cursor position in Console?

后端 未结 3 1854
南方客
南方客 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条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-28 23:53

    It depends on your previous Console.WriteLine() statement. Change it to Console.Write() which does not have the linebreak.

    static void Main(string[] args)
    {
        Console.Write("HeresomeText>");
        Console.ReadLine();
    }
    

提交回复
热议问题