output box (cmd)

G

Guest

when a class is compiled and run,(simple hello world for example) the command
box flashes up with whatever the program did, then disapears! so never able
to see for more than a fraction of a second what program output was.
visual studio 2005 express.
any setting for keeping command prompt box open after program finishes
executing?
 
M

Marc Gravell

If you are talking about when playing via the debugger, then adding
Console.ReadLine() at the end might suffice - then press Return to exit the
console. There might be a prettier way, but it works (I'm the eternal
pragmatist when it comes to debugging...). You could also wrap in in an #if,
i.e.

// your "Main" function...
#if DEBUG
Console.ReadLine();
#endif
// end of your "Main" function...

Marc
 

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

Top