leet hacker![]() Member Posts: 118 From: Hobbiton, Shire, Middle-Earth Registered: 07-30-2007 |
ok, so i've started c# programming. i am using the wikibooks book, c# programming, and (of course) the first program is "hello world". it won't work when i try to run it. here is the code:
can someone tell me what is wrong with that? i copied it exactly from the book, and i even tried copy-and-pasting it, but it still wouldn't work. ------------------ |
|
SSquared![]() Member Posts: 654 From: Pacific Northwest Registered: 03-22-2005 |
What exactly does not work? Does it crash? Not run? Does the console window start? Are you compiling from the IDE or from the command-line? If you are compiling from within the IDE, then look for the Solution Explorer window in the IDE and right-click on your project. Select 'Properties'. A new window opens. Click on the 'Application' tab on the left. Check your output type and be sure it is set to Console Application. You may have it set to Windows Application. |
|
Skynes Member Posts: 202 From: Belfast, N Ireland Registered: 01-18-2004 |
I'm using the Visual C# 2005 Edition. I used the exact code you gave (cut n paste) I went to File --> New Project. I chose a Blank Project. I added a new class called MyFirstClass copied your code in. Built it and ran it.
|
|
leet hacker![]() Member Posts: 118 From: Hobbiton, Shire, Middle-Earth Registered: 07-30-2007 |
quote: i tried that, but i can't find the code window. ------------------ |
|
ArchAngel Member Posts: 3450 From: SV, CA, USA Registered: 01-29-2002 |
So it does compile? To get the code window, go to the solution explorer and open the file you want or add a new class under Project->Add Class. again, did the same as sknes and it worked just fine. Did you try what S2 suggested? Sounds like he really nailed your problem on the head. ------------------ |
|
leet hacker![]() Member Posts: 118 From: Hobbiton, Shire, Middle-Earth Registered: 07-30-2007 |
now it's working. ![]() ------------------ |