November 14th, 2008
How to get started with C# - 1

Time to get going on that C#. So which road to take? Should you go the Microsoft way, or gain your stripes as a Linux guru? You can have it both ways and here I go into how to install a free C# development environment on either Windows or Linux.
The days of having to buy expensive compilers before you could write a single line of code are gone. For both Windows and Linux there are free compilers and editors which allow you to get started writing productive code within minutes of installation. (For Linux, in the context of this guide please read “Ubuntu” as its currently the most common distribution and the one I use most.)
If you are in a hurry, skip directly to the “how to download” section:
Which OS to use?
Two major choices will be Windows and Linux. Most likely you won’t change your operating system just for writing code , but you just might.
One of the key things to take in consideration when selecting your platform is where your code will run, and whether or not you will need a graphical user interface (GUI). This is the largest point of difference between writing a C# application under Windows or a C# application on another platform. Many of the other libraries follow a “standardized” approach and can be used on either Windows or other systems without modification of code.
The time to learn how to program a new GUI library is significant and you should carefully consider your requirements before selecting one.
- GTK# is the library used to access the Gnome GUI on Linux, it is also available on Windows and MacOS
- Windows.Forms is the library used to access the Windows GUI on XP and Vista
GTK is the library underlying the Gnome Desktop. It is portable, and code targeting GTK can be run on Windows, Linux and MacOS. The most famous GTK application is probably Gimp, the free graphic editing software. If you are unfamiliar with GTK, have a look at their screenshots page.
Windows.Forms is part of Microsoft platform, and is tightly integrated with it. It is the best choice if you only target Microsoft Windows (XP, Vista..), and care about tightly integrating your application into the OS and do not worry about having to port your code to another platform in the future.
The Mono team is developing a Windows.Forms alternative to their native GTK# library which should make it easier to port existing Windows.Forms C# applications to Linux, but it is in development and not ready for production use.
Getting Started with C# on Windows
You could go the whole way, and put down the cash for Microsoft flagship development IDE Visual Studio 2008. And if you are a serious about targeting the Windows platform its probably well worth its money. Fortunately Microsoft came to realize that not everyone has a minimum of US$ 800+ idly sitting around to try their hand at something completely new.
So their marketing department came up with something “simple”, “fun” , “easy to learn” and best of all free: Microsoft Visual Studio Express Edition. Visual Studio Express Editions are free permanently, so if C# is not your thing, you could try your hand at C++ or Visual Basic.
Why take this road?
- You are just learning C#
- You want to write software targetting Windows (XP, Vista) only
- Or you just want to write C# code that doesn’t require a user interface
How to install
- Download Microsoft Visual Studio Express Edition
- Install, reboot
- Click “Start > Programs > Microsoft Visual C# 2008 edition”
Getting Started with C# on Ubuntu
With the Mono Development environment writing C# code on Linux is as easy as on Windows. The Mono team has build a free, stable compiler that runs on Linux, Windows and MacOS (among others). An important note is that Ubuntu currently only supports the 1.0 (Stable) version of MonoDevelop and Mono. Many changes have been made to support many of Microsofts latest features, but there is currently no stable 2.0 release of Mono Develop which runs on Ubuntu.
Why take this road?
- You are just learning C#
- You want to develop GTK# applications that run on both Linux and Windows and MacOS
- OR you want to develop C# code that doesn’t require a GUI user interface
How to Install
- Cut & paste “apt:mono-2.0-devel” into your web browser bar
- Alternatively, use “System > Administration > Synaptic Package Manager” and add the “mono-2.0-devel” package
- Click “Applications > Programming > MonoDevelop”









Except where otherwise noted, content on this site is
August 22nd, 2009 at 1:29 pm
This is the best no nonsence ‘How to Get Started Tutorial’ I have ever read. thanks a million dude.