Mono
About the Mono Technology
How Will Mono Technology Change My Life?
Mono is enabling you to write desktop applications faster and leverage the existing GNOME platform as well as
bringing you a new set of development tools.
HelloWorld
This is a must in every book or tutorial, a "Hello, World!" program, so here it is:
using System;
class Hello {
static void Main() {
Console.WriteLine ("Hello, World!");
}
}
mcs Hello.cs -o hello.exe
mono hello.exe or
mint hello.exe
Architecture
Tools
MonoDoc
Mono Compiler Suite (mcs)
Mono Interpreter (mint)
Mono Content dumper and disassembler (monodis)
Mono debugger
Linux kernel support for binaries
You can make your mono .exe files executable by following these steps:
- Enabling binfmt in your kernel.
- Adding the line below to your fstab:
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc none
- On boot run the cmd below:
echo ':CLR:M::MZ::/usr/bin/mono:' > /proc/sys/fs/binfmt_misc/register
- chmod +x foobar.exe
Another way to accomplish the above is to wrap the
mono .exe file it in a shell script, like this:
#!/bin/sh
/usr/bin/mono /usr/bin/mcs.exe "$@"
Questions and exercises
Credits
Author: Martin Willemoes Hansen