Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Learn to code using the C# programming language in Mac OS X

Lucy Hattersley | May 28, 2016
How to use C-sharp on your Mac

C# (pronounced "c-sharp") is a great coding language that works across Mac and PC. Programmers use C# to build a variety of applications, especially in the Windows environment.

C# is only one language inside Microsoft's .NET framework, but since Windows 8 it's become the biggest one. Windows developers head straight to C# for building applications on Windows desktop.

In this feature we'll look at the following:

  • Learn C# in OS X: what is C# and why should you learn to program in it?
  • How to set up C# in OS X
  • Set up MonoDevelop IDE in OS X
  • Learning C# in OS X

So why would you want to learn C# on a Mac? There are lots of reasons for flexing your coding skills towards C#. While C# is tied to the Windows environment, it's cross-platform so that you can learn it just as well on a Mac as a PC.

C# is also a good language for people looking to get into games development. You use Unity, a 2D and 3D game engine and framework with C# (or JavaScript). You can use Unity to develop games for all platforms, including iOS. The close ties to Unity makes C# a good choice for the would-be game developer.

Even if you're a Mac person through and through, C# is an excellent programming language, with modern features such as Delegates, Yield statements, and Lambdas. Microsoft is firmly behind mobile and desktop development, and it's the future of development on Windows. It's worth learning C# if you ever plan to develop programs for both OS X and Windows, or to take apps from one platform to another.

Plus, even if you're an Apple fan, it's always good to see what the competition is up to.

Learn to code with C-sharp on Mac: Set up MonoDevelop to create C# programs on a Mac

Learn to code with C-sharp on Mac: Install MonoDevelop in OS X

Visual Studio Code is perfect for writing C# programs, but you can't compile and run them. It's a code editor, not a full IDE.

To compile and run C# programs you'll need an IDE, MonoDevelop is the one to get. Download a copy of XamarinStudio (MonoDevelop coupled with Xamarin iOS/Android plugins) from the MonoDevelop website:

  1. Go to MonoDevelop and click Download Xamarin Studio under OS X.
  2. Double-click "XamarinStudio-5.10.1.6-0" (or later) in the Downloads folder.
  3. Drag Xamarin to the Applications folder.
  4. Double-click Xamarin in the Applications folder.
  5. Click Download Mono Framework. It will open the Mono Project.
  6. Click Download Mono Universal Installer.
  7. Double-click "MonoFramework-MDK-4.4.0.142.macos10.xamarin.universal" file to open it.
  8. Click Continue and follow the Mono Framework installer instructions.

When the installation has finished, return to the Applications folder and open the Xamarin Studio library again.

 

1  2  Next Page 

Sign up for CIO Asia eNewsletters.