Advertisement

[.net] csc helloworld.cs ??

Started by December 25, 2004 01:22 PM
2 comments, last by stroma 19 years, 9 months ago
hi, i started c# a yesterday ^_^ i have the .net framework 1.1 but i do not have a complier like visual studio. book says i do not have to. says write this in notepad : class HelloWorld { public static void main() { System.Console.WriteLine("Hello World"); } } and save it hellworld.cs, run "cmd" and type : csc helloworld.cs and it does not work,? outputs: ERROR CS5001: program ...\helloworld.exe does not have an entry point defined. what is the problem? do i have to use something like using System.Console; ??? do i have to install something more? Thank you..
+-+-+-+-+-STR
The method 'main' needs to be capitalized -> "Main". Methods in C# are case sensitive, so 'main' is different than 'Main' or 'MAIN'

C# can be a lot of fun to learn. Good luck!
Advertisement
Why don't you download the Visual C# 2005 Express beta ? It's free, it's not too big, and it's a great tool to write, compile and test C# code (a LOT more than notepad and the command line).
Grab it there: http://lab.msdn.microsoft.com/express/

Another free and open-source alternative is #Develop, which you find at this adress:
http://www.icsharpcode.net/OpenSource/SD/

Have fun,
jods
thank you, now it works. (how did i make this mistake [totally] )

i am going download Visual C# 2005 Express beta (already have the one for c++ )
i just wanted to know that if i can make it without compliers. ^_^


merry christmas!
+-+-+-+-+-STR

This topic is closed to new replies.

Advertisement