Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 10th, 2007, 01:26 PM
Registered User
Join Date: Aug 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Console application but no Console

I posted this in another forum, but that one looks pretty dead, So I'll cross post against my better judgement. :)

I'm working through Beginning Visual C# 2005. And I'm stuck on the first example. :)

The code is the following:

namespace ConsoleApplication2
    class Program
        static void Main(string[] args)
            //Hello World to Console hopefully
            Console.WriteLine("Hello World!");
I've made sure of the following:

1) Visual C# developer settings are applied. It used to be VB.
2) I did an unistall and re-installed VS.
3) I made sure that Output Type was Console Application in Properties | Application Tab.
4) I've run it with Ctrl-F5. Which runs it without debugging. It does go to a console window then, But the ReadKey still does not seem to work.
5) I made sure that in Tool | Options | Debugging |Redirect all output to the quick console Option is unchecked.
6) I've tried adding another WriteLine after the ReadKey and put a breakpoint on it, and it does not get there and there is no console window.

I'm not sure what else to try.

Any ideas would be appreciated,


Reply With Quote
  #2 (permalink)  
Old August 22nd, 2007, 11:17 AM
Registered User
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Change the readkey to readline

Reply With Quote
  #3 (permalink)  
Old August 22nd, 2007, 11:41 PM
Authorized User
Points: 129, Level: 2
Points: 129, Level: 2 Points: 129, Level: 2 Points: 129, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2007
Location: Gurgaon, Haryana, India.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vksingh24

very true: tron_here

replace your Console.ReadKey() with Console.ReadLine()

Vikash Kumar Singh
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
to run console application MunishBhatia ASP.NET 2.0 Professional 2 October 1st, 2007 01:25 AM
Printing from console application pilgrim7993 BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 December 16th, 2006 05:39 AM
Console Application digby_dog VB.NET 2002/2003 Basics 2 April 29th, 2005 10:52 AM
SendMail from a Console Application r_ganesh76 General .NET 3 March 1st, 2005 11:25 AM
Ending a console application FarCry VS.NET 2002/2003 9 May 26th, 2004 11:17 AM

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

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