Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2007, 11:41 PM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Console windows

Hi, I'm just started to study C# and have a question.
In the book, the console result stays as displaying "Press any key to continue" at the end.
However, whenever I run the test, it shows very shortly and disappear right away. I'm running VS on Vista.
Is there any option to make my console stay without shutting off?

Thanks,

John.

 
Old May 23rd, 2007, 11:54 PM
Registered User
 
Join Date: Jan 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You might be pressing F5 to run the program. Press Cntrl + F5. Which will start your program without debugging. You can even use F5, by placing a break point in any line of your code which will allow you to debug your code. You can place a breakpoint on any line by pressing F9.

Cheers
-Pallav

 
Old May 24th, 2007, 12:24 AM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ahahahahahahahah.......................
Thanks..
I will study hard and ask something better make sense.
Ctrl + F5 works for me.
John.

 
Old May 24th, 2007, 01:01 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You could also add:
Code:
Consolw.WriteLine("Press ENTER to end.");Console.ReadLine();
which will wait until you press ENTER.

--

Joe (Microsoft MVP - XML)
 
Old May 24th, 2007, 01:43 AM
Authorized User
 
Join Date: Nov 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wow..simply you're the man, Joe!
I've been enjoying reading your book.
Thanks you so much.

John.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Console sektor Visual Basic 2008 Essentials 0 July 10th, 2008 12:43 AM
Console application but no Console gamotter C# 2 August 22nd, 2007 11:41 PM
accessing windows application from console anandthecoolest C# 2005 1 February 21st, 2007 07:12 PM
Windows Service and Console Application ndramkumar General .NET 0 March 26th, 2006 11:26 PM
console dts veki SQL Server DTS 1 September 14th, 2004 12:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.