a beginner's question
-
Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help
-
Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help
You can either Debug the code, manually run it from the command line, or put in a Thread.Sleep(x) where X is the number of Milisecoinds you want the program (current thread) to pause for. If you use the Thread.Sleep option, you will need to reference the System.Threading library.
-
Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help
I do the same. I use
#if DEBUG
Console.ReadLine()
#endifSo that it only does it in debug builds, and release builds work normally. --Colin Mackay--
-
Hi friends: i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ? thanks for your help
This is because your main method is finished. At the ned of your program put while(true); But you will have to close the project manually