C# console program

Ezguy

Freshman
Joined
Jul 24, 2003
Messages
41
Hi all,

First I want to wish you all a happy new year.

This is my problem.

I have entered the following code in c#


/*
This is a simple c# program
*/

using System;

class Example
{
public static void Main()
{
Console.WriteLine("A simple c# program.");

}
}

My problem is when I run the program it opens a blank window with out showing the text " simple c# program" on the console screen. Is there any setting that needs to be activated.

Please reply
 
I copyed the your code and it worked great, I think your problem is that you have to create a C# Console Aplication, that's what I did, or you can change the project type in the solution explorer in the project properties.

I also made a new file example.cs with that code and then I copiled it with the command line "csc example.cs" and it worked great too.

Try some of this and tell me..

Bye,
Ronq.
 
Back
Top