-1

I am building a base os, with COSMOS (I don't have a mac). So, I have successfully got the os to accept three commands, help, shutdown, restart.

However here is the bit I am stuck on:

Console.Writeline("Command>");
Console.Readline();

This gets this:

Command>
[blank space for Readline command]

Here is what I want:

  1. The Console.Readline input to be on the same line as Console.Writeline

So This is what I want (user interface):

Command> [user input here]

leppie
  • 115,091
  • 17
  • 196
  • 297
td512
  • 101
  • 2
  • 8

1 Answers1

5

WriteLine will write a line, hence you should use Console.Write(...) in order to not append a \n character.

Levente Kurusa
  • 1,858
  • 14
  • 18