I am running my C# executable from cmd and I want to be able to see the return values when the program is done.
Right now i run the program from cmd, it runs and then nothing.
What do I have to do to set up cmd or my program in order to read these return values?
Reading return values in cmd
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

naura paxRank #2,843 · 502 reputationPosted Oct 23, 2009, 5:57 AM EDT
you'd need to write code in your program like following to give output in console-
Console.WriteLine("My answers are {0} and {1}",ans1,ans2);
Roei BarRank #1,271 · 1.4K reputationPosted Oct 23, 2009, 6:02 AM EDT
a
Console.WriteLine
on every value you want to see
Kirtan PatelRank #292 · 8.6K reputationPosted Oct 23, 2009, 6:04 AM EDT
@ [email protected]
will solve your problem quickly
thanks :)
Dan3 reputationPosted Oct 23, 2009, 2:29 PM EDT
That worked perfectly. Thanks for your help guys.