0

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

HeresomeText>(input)

Not like

HeresomeText>
(input)

Is it possible to do?

Filburt
  • 17,626
  • 12
  • 64
  • 115
Mg112
  • 27
  • 2
  • 9

3 Answers3

3

use Write method instead of WriteLine Method:

 Console.Write("HeresomeText> ")

in addition you can use SetCursorPosition:

Console.SetCursorPosition(int left, int top);
Andria
  • 4,712
  • 2
  • 22
  • 38
SHM
  • 1,896
  • 19
  • 48
1

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.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
0

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();
}
Thomas Weller
  • 55,411
  • 20
  • 125
  • 222