Click to See Complete Forum and Search --> : Cursor Position in a DOS Console Application


apasuper8
September 17th, 2002, 10:55 PM
How do I get the user input line to be entered on the same line as a question being asked?

EX:

Console.WriteLine("Input a number:");
number = Convert.ToInt32(Console.ReadLine());

Console.WriteLine("The number that you entered was {0}", number);

If I run this simple example, my Blinking cursor is on the next line below waiting for the user input. Just wondering how I can get it on the same line. Thanks!


APASuper8

mikescham
September 17th, 2002, 11:55 PM
use Console.Write

apasuper8
September 18th, 2002, 06:23 AM
Thanks.