Console Application Question

  • Thread starter Thread starter Jacques Daniels
  • Start date Start date
J

Jacques Daniels

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
 
Jacques Daniels said:
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.
 
* "Jacques Daniels said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top