Download Project: Lesson 1 - Say Hello Gtk#
First, open MonoDevelop and create a new empty project. Then, add an empty class file into project. Copy this code below to the file:
using System;
public class Lesson_1 {
public static void Main() {
Console.WriteLine("Lesson 1: Hello Gtk#! It's so wonderful!");
}
}
If you already know C#, you, hence, know what it means.
Now click on the menu Build -> Build Solution or F8.
Click menu Run -> Run or Ctrl+F5.
You will have result like this:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjrhDDBF7sSqKTGgIoJ_ud6Eh6OhAgYSCmehMP7gt_-JxjJgzTJWCimLJkLlcg6qDHv3GCAZbf94dSf2Tdf3lBrAdKakPbTppeuxxwaz1AE4uw_Mb0gb3L0NTUV-hnpFl8IolRtn5QQSye/s400/Lesson_1_Say_Hello.png)
However, if you want to compile a single C# file or a C# project manually, then do this.
Open the terminal:
terminal> mcs -pkg:gtk-sharp-2.0 Main.cs
A file named Main.exe will be generated. In order to run this file you have to use mono utility:
terminal> mono Main.exe
The result will show up exactly how it is while using MonoDevelop.
Have fun!