By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Console Application Question

P: n/a
I am using System.Console.WriteLine(" ") to output the results of a function
to the console window. Before I can see the results of my function, the
window is closing. How can I prevent this?

Thanks
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Jacques Daniels" <jd@moodylabs.com> skrev i en meddelelse
news:Fl****************@nwrddc03.gnilink.net...
I am using System.Console.WriteLine(" ") to output the results of a function to the console window. Before I can see the results of my function, the
window is closing. How can I prevent this?

Thanks


Hello,

Just add System.Console.Readline() at the end, and the console will wait for
you to press enter before closing the window.

--
Lasse
Nov 20 '05 #2

P: n/a
* "Jacques Daniels" <jd@moodylabs.com> scripsit:
I am using System.Console.WriteLine(" ") to output the results of a function
to the console window. Before I can see the results of my function, the
window is closing. How can I prevent this?


Start the application from the command prompt ("cmd.exe").

- or -

Add a call to 'Console.Read' at the end off the application.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.