Oh, HelloWorld @ C#
using System;
class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello, world!");
}
}
class HelloWorld
{
public static void Main()
{
Console.WriteLine("Hello, world!");
}
}
Nothing is impossilbe! Extreme Optimizing
1 Comments:
At January 27, 2005 at 6:06:00 PM PST,
Shunkai Fu said…
Comments on HelloWorld.cs
- using System: it indicates that the program uses classes from the System library, like #include directive in C
- The class Console is part of the System library and one of its members is WriteLine().
- The static method Main() is the entry point into your application. It is also the exit point from your application. Here it is declared as void. If you wish to return a value to another process use the following declaration:
public statis int Main()
{
int nShare = 0;
// commands ...
return nShare;
}
Post a Comment
<< Home