We will use Mono as a development platform for our starting programs. Therefore, we will start seeing where to find this tool, how to install and how to use it.
Mono can be downloaded from its official website:
http://www.mono-project.com/
At the top, there is a download link ("download now"), which leads to a new page where you must choose the platform you want our Mono. We'll download the latest version for Windows (2.10.9 at the time of this writing).
It is a file over 80 Mb in size. When the download is complete, we must double-click the downloaded file and start the installation, which first shows the welcome message. Then we will have to accept the license agreement. After that, we will be asked in which folder we want to install. As usual, we proposed to be within "Program Files":
I don't like installing everything in "Program Files". My programming tools are often in another drive (D:), so I prefer to change the default setting.
The next step is to choose which components we want to install (Mono, Gtk #, XSP):
p>
Again, I prefer not to install everything. Mono is a must. Creating user interfaces with Gtk# is beyond the scope of this text, but still may be of interest for those wishing. The XSP web server is clearly unnecessary for now, and also installing a "listener" would slow down the computer slightly, so it may be reasonable not to install it now.
If everything is OK, after a moment we will have the confirmation that the installation is complete.
Mono is ready for use. In our Start menu should have a new folder called "Mono x.x.x for Windows" (where x.x.x would be our version number, such as 2.10.9 or 1.9.1), and within it we should have access to "Mono-x.x.x Command Prompt":
p>
If we click this option, we access the command prompt (the operating system black screen), but with the "search path" prepared so that we can access the compiler from it.
Now we must type our source program, using any text editor. In this first source, we might use just the "Notepad" in Windows, typing:
notepad example01
"Notepad" should appear on screen, along with a notice that tells us that there is no such file, and asks us if we want to create. We should answer Yes and we can start typing any source file. When we are done, we can save the changes, exit "Notepad" and we will be again at command prompt black. Our source has been created. The next step is to compile it, typing:
gmcs example01.cs
If we have no answer, it means that there are no errors, and a file named "example01.exe" would appear. In that case, we could run the program by typing
mono example01
and the message "Hello" should be displayed on the screen.
If your computer has the "Dot Net Framework" installed (which should be true in the latest versions of Windows), you should be able to run the program simply typing its name, no need to call "mono":
example01
Note: If you want a more powerful editor than Windows Notepad, you can try Notepad++, which is free (actually not only free: it is "open source") and you can easily find online.