This is a classic Hello World, if you are using Windows then there should be included with it .net, which has the .net runtime environment (this is stored in C:\WINDOWS\Microsoft.NET\Framework\v*). If you are using another OS or wish to try out Mono (http://www.mono-project.com/Main_Page), which is a open source .net compiler and run-time environment.
The helloworld code example
---
public class helloworld
{
public static void Main(string[] args)
{
System.Console.WriteLine("Hello world!");
}
}
---
save as helloworld.cs
To compile with MS .net
csc helloworld.cs
which creates a executable file to execute.
helloworld.exe
with the output
Hello world!
or within mono
mcs helloworld.cs
and then to run the program you can either just type in helloworld.exe as like MS .net or use the JIT (Just In Time) environment, mint.
mint helloworld.exe |