[.net] csc helloworld.cs ??
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!
C# can be a lot of fun to learn. Good luck!
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement