Wednesday, August 17, 2011

Mono

Mono is open source cross platform implementation of .Net I am using Mono in Ubuntu 10.10.
The preferred way to develop Mono in Linux is using MonoDevelop. MonoDevelop is a Mono IDE.

First let's see how to develop Console Application in Mono.
Once you have installed Mono you can go to the Terminal by going to Application, Accessories and select Teminal. The mono C# compiler is mcs.

class Hello
{
  public static void Main()
  {
    System.Console.WriteLine("Shalvin");
  }
}



So type mcs .cs in the terminal for compiling the C# file.
Once it is compiler you can access the exe using
mono .exe.


















Windows Forms
using System;
using System.Windows.Forms; 

class frmHello : Form
{
  public static void Main()
  {
    Application.Run(new frmHello());
  }
}

No comments:

Post a Comment