Click to See Complete Forum and Search --> : Novice: DOS help
Organic Lettuce
June 6th, 2009, 10:49 PM
Why is it that whenever I Debug or Run a console application with just the code: Console.WriteLine("Hello World"), ms-dos just pops up on screen for a split second with the words "Hello World" and then EXITS BY ITSELF? In order for me to keep the screen from exiting I wrote: Console.Readline() but that's really annoying to do all the time...
Organic Lettuce
June 6th, 2009, 10:51 PM
I'm using VB 2008 on Windows XP SP2 if that matters...
dglienna
June 7th, 2009, 12:45 PM
That's EXACTLY how a console app is supposed to use, and adding READLINE violates that rule. It is useful for debugging, sometimes.
wilcora
June 12th, 2009, 01:36 PM
to hold a command window open when debuging your code
add a line such as
dim str as string = string.empty
then set a break point on this line of code, this will cause the window to stay open until you step thru this line of code.
make sure this is the last line of code executed.
This line of code can remain for run time usage with no worrys.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.