0

HEy,
I am new to C# and dont know much about it. I am facing a problem while running my code in Visual Studio 2008. The problem is that the screen disappears immediately when the program ends. please help me. Thanks in advance.

4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by thines01
1

Hello Maheed, welcome on this site.
Seems like you where trying to start what is called a Console application. You have to put as a last line of code a "read" statement, so that the console window stays on screen. I usually use Console.ReadKey();

0

HEy,
I am new to C# and dont know much about it. I am facing a problem while running my code in Visual Studio 2008. The problem is that the screen disappears immediately when the program ends. please help me. Thanks in advance.

As previously mentioned you are starting Console type application. Instead of using F5 for starting the project, try CTRL+F5. See what will happen.

0

If you're debugging, you can set a breakpoint on the last closing curly brace on your "Main" and it will allow you to see the output before the window closes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.