473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

suppress CRLF after Console.WriteLine

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 <enterto continue: ") <--- have
the cursor remain here at the end of the line
Console.ReadLine()
I copied this form the console:
Hello World
Press <enterto continue:
< --- cursor is flashing under the "P", but I want it to be after the word
"continue<colon><space>"

Thanks, Tracey
Apr 18 '07 #1
3 4003
"Tracey" <wp***@gte.netwrote in
news:#w**************@TK2MSFTNGP05.phx.gbl:
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 <enterto continue: ") <---
have

Use console.write instead of writeline
Apr 18 '07 #2
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 <enterto continue: ") <---
have
the cursor remain here at the end of the line
Console.ReadLine()
I copied this form the console:
Hello World
Press <enterto continue:
< --- cursor is flashing under the "P", but I want it to be after the
word
"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 <enterto continue: ")
Console.ReadLine()
-------------------------------------------------------------

Hope this helps

--
Rory
Apr 18 '07 #3
"Tracey" <wp***@gte.netschrieb:
How I can have the cursor remain at the end of the 2nd Console.WriteLine -

='Console.Write'.

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

Apr 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: jabailo | last post by:
This is driving me crazy. I finally got the Remoting sample chat application working almost. When I run the chat client in VS.NET it goes into an endless loop -- that's because I assume that...
7
by: shawnk | last post by:
Hello Everyone How do you format format numbers right-justified using Console.WriteLine(), i.e I need to line up numbers in vertical columns and the MSDN documentation is pretty poor Here is the...
3
by: Roy Gourgi | last post by:
Hi, How would I set the width of lnSize to 6 in the statement Console.WriteLine("Size of {0} ", lnSize); Furthermore is there a way to combine these 3 statements into 1 ...
5
by: portroe | last post by:
Hi I am using console.Writeline in my simple program. I do not however see anything happening in the output window when I debug, there are also no error messages, Has anybody a tip on what...
4
by: Bob | last post by:
I just recently noticed that when I start my applicatoin in debug mode, the IDE hangs (no disk or CPU activity) indefinitely (at least 20 minutes). Pausing the application shows that it's hung up...
4
by: Rob | last post by:
I am reading a VB.net book which includes many samples where the author uses the Console.Writeline feature to illustrate a point. I assume that is Console.Writeline is supposed to send something...
4
by: Leszek | last post by:
Can someone help me? Im trying to use console.writeline with ciag1. Application must read string, split it by "," and show every section between ",". Dim serwery_split() Dim elementy As...
3
by: Andrew Ducker | last post by:
We were using Console.Writeline from within our app, to do some routine debugging. And then we started having random problems when the code was run by a tester, on their own machine. We...
2
by: djc | last post by:
out of all the overloads that pop up via intellisense for console.writeline() the following one confuses me: Console.WriteLine (string format, params object arg) 1) whats the deal with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.