0

I want to put a character before the user input, like in the regular cmd. I tried Console.WriteLine("]", input = Console.ReadLine()) where input is the string that gets the user input, but it does not work. I also tried something on the lines of Console.WriteLine("]" + input = Console.ReadLine()); but this returned me the error 'The left hand side of an assignment must be a variable, property or indexer'.

Terpomo
  • 9
  • 1
  • 2

1 Answers1

3

Use Console.Write instead of Console.WriteLine to read the input from same line

Console.Write("]"); // does not insert new line after ]
input = Console.ReadLine();
Sergey Berezovskiy
  • 232,247
  • 41
  • 429
  • 459