p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Book: Wrox's Visual C# 2005 Express Edition Starter Kit (http://p2p.wrox.com/forumdisplay.php?f=243)
-   -   Page 17 - Debugging the First C# Express Project (http://p2p.wrox.com/showthread.php?t=67993)

kennethjaysone May 9th, 2008 12:27 AM

Page 17 - Debugging the First C# Express Project
 
I'm using Visual C# 2008 Express Edition to work through with this book.
I understand that it's title and the book itself advises us to use Visual C# 2005 Express Edition.

In page 17 under the TRY IT OUT section, under the 3rd set of instructions, i am told to select Debug and then choose Start/ or hit F5.

This is suppose to build, compile and run my application. When i do that
(Visual C# 2008 Express Edition), the console window does not appear, it only appears like for less than a second and then it dissapears. Is this normal? The console only appears when i select Debug and then choose start without debugging/ CTRL + F5.

Why cant i see the console if i follow the book? Is it because i'm using Visual C# 2008 Express Edition and not Visual C# 2005 Express Edition?

Thank you in advance for all your thoughts and views.

Kenneth


rafeeqibrahim June 15th, 2008 01:37 PM

Hi i had the same problem what you need to do is press ctrl and F5 at the same time then the command prompt will not flash it will stay on your screen so you can see it.

Hope that helps.

Rafeeq

Rafeeq Ibrahim

sh_erfan November 7th, 2009 01:05 PM

Hi

are you sure your code contains this line at the end:
console.ReadLine();//or console.ReadKey()

This code waits until you press ENTER(or any key if ReadKey() selected) then the console disappears.

but if your code contains the line above and the console diappears it is sth strange.
because I myself use Visual C# 2008 Express Edition and by pressing F5 I have my application running and the console does not diappear until the last line of code is executed(pressing ENTER or any key).

Erfan...

phantom September 8th, 2010 04:31 AM

The Solution :-)
 
At the end of your code,
put Console.Readkey() as the above post says,
then the computer will wait for u to type one more character
before the console window closes( or flashes thru )
You can also use System.pause(),
but Console.Readkey() does the trick :-)
It does not make any difference if you are using 2005 or 2008 or 2010 !
Cheers, happy coding ^_^.[:p]


All times are GMT -4. The time now is 12:58 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.