How do I get the console from closing immediatley upon opening in a Console Application program? I have all of the code written but when I run the program it pops up the console window and then immediatley exits so I am unable to read what is in the window to see if my program is operating correctly. This is the first time I've ever used a console window so I don't know where in the code I would need to put "whatever it is" I might need to put to keep the window open until closed by the user.
lbgladson 0 Junior Poster in Training
Recommended Answers
Jump to PostConsole.Readline()
Jump to PostSee also Console.ReadKey
Put it at the very end of your 'Main' method.
All 7 Replies
the_carpenter 21 Junior Poster in Training
gusano79 247 Posting Shark
the_carpenter 21 Junior Poster in Training
thines01 401 Postaholic Team Colleague Featured Poster
the_carpenter 21 Junior Poster in Training
aquamarine_kath 6 Newbie Poster
Begginnerdev 256 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.