Tutorial - C# / Mono - Hello world ! classic


Coding Friends Tutorial Index - > C# / Mono

Author Ian - Tutorial Posts = 62
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
Creation of cool tutorials :)
User Name Password
Copyright@CodingFriends, 2005-2006. All Rights Reserved.
Home | Forums | Tutorials | Users
RSS Feeds - Global Global CodingFriends RSS Feed - Tutorials Tutorials CodingFriends RSS Feed - Forums Forums CodingFriends RSS Feed - News News CodingFriends RSS Feed
Users
Login|Password problem| Register here

Tutorials
Tutorials Home| C/C++| C#/Mono| Java| Javascript| PHP| Ruby| SQL| (X)HTML/CSS| VB| Linux| Windows

Forum
Forum Home

Projects
3D Game

Site
Home| About me| Links| FAQ

Search