How I can have the cursor remain at the end of the 2nd Console.WriteLine -
(without a <carriage-return>/<line-feed>)
Console.WriteLine("Hello World")
Console.WriteLine("Press <enter> to continue: ") <--- have
the cursor remain here at the end of the line
Console.ReadLine()
I copied this form the console:
Hello World
Press <enter> to continue:
< --- cursor is flashing under the "P", but I want it to be after the word
"continue<colon><space>"
Thanks, Tracey
Spam Catcher - 18 Apr 2007 18:51 GMT
> How I can have the cursor remain at the end of the 2nd
> Console.WriteLine - (without a <carriage-return>/<line-feed>)
> Console.WriteLine("Hello World")
> Console.WriteLine("Press <enter> to continue: ") <---
> have
Use console.write instead of writeline
Rory Becker - 18 Apr 2007 19:36 GMT
> How I can have the cursor remain at the end of the 2nd
> Console.WriteLine -
[quoted text clipped - 11 lines]
> "continue<colon><space>"
> Thanks, Tracey
"Console.Writeline" always appends a crlf
Use "Console.Write" if you do not want this to happen.
In this case, use
-------------------------------------------------------------
Console.Write("Press <enter> to continue: ")
Console.ReadLine()
-------------------------------------------------------------
Hope this helps
--
Rory
Herfried K. Wagner [MVP] - 18 Apr 2007 20:45 GMT
"Tracey" <wpiis@gte.net> schrieb:
> How I can have the cursor remain at the end of the 2nd Console.WriteLine -
=> 'Console.Write'.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>