apt-get update apt-get upgrade
I actually run the command twice as it gave some warnings and to run it again. Then to install Mono tun the command
apt-get install mono-complete
which will download and install Mono. Once done (it will take a while) create a directory and create a file (you need to learn how to use an editor like vi or nano) called test.cs with the following contents.
using System;  
namespace hello {
    public class HelloWorld {
       public static void Main()
       {
           Console.WriteLine("Hello, World!");
       }
    }
}
Run the following command to compile the file
mono-csc test.cs
If it works then it creates a file called test.exe. You can run it directly using
./test.exe
Or more correctly you should use
mono test.exe
 
No comments:
Post a Comment