Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

console application question 1

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
0
0
US
You will laugh at the simplicity of this question.

I have experience with asp.net websites, and with Java applications running in a commandline environment. However, I have never done a console application using Visual Studio. Now I need to make a console application using vb.net and VS2005.

I wrote a hello world program but the command window only appeared momentarily. I put the hello world statement in an infinite loop, and that worked as expected.

How do I print "hello world" only once, but keep the command window instantiated???
 
The command window is disappearing because you're program has ended. Place a Console.ReadLine as your last line in the program to make it wait for you to press the Enter key.
 
When testing your console program in Visual Studio, you can select "Debug" and then "Start Without Debugging", and it will automatically put in a "Press any key to continue" prompt at the end and hold your console window open until you hit enter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top