Sitemap
Martinsoft

Hello! Welcome to the Martinsoft blog! We share tech news, mobile app development stories, and help to make tech less daunting.

Learn a Language: C#

5 min readAug 13, 2018

--

Learning to code requires a HUGE investment of time and energy. For newcomers it’s also difficult to know where to start because there are so many languages to choose from. Through my Instagram account I’m often asked:

“Which programming language should I learn?”

I wanted to be able to give a better answer than “it depends”, so with this Learn a Language series, I hope to build a resource that’ll help people decide for themselves which language they should invest their time in learning!

With help from other developers across the tech community, each article will give an overview of a popular programming language, from a developer experienced in that language. We’ll look at what each language is good at, what it’s not so good at, and the tools/resources that can help you get started.

In this article, Charlene Hunter gives an overview of C#!

Charlene aka @retnuh58

How long have you been working with C#?

I’ve been working with C# on and off for about 7 years.

What made you choose to work with C#?

The first time I worked with it, it was the language chosen by the organisation I was working for, so I had no choice. When I’ve used it on personal projects, I’m using Xamarin and thats in C#, it’s great for cross platform apps.

What sort of things is C# well-suited for? When should someone consider using C# for their project?

C# was created by Microsoft as an alternative to Java. It’s great for back-end, server side applications that are hosted on Windows. It’s also good for web development using ASP.NET, and can also be used to build cross-platform mobile applications.

If you also know other languages, how does C# compare to these?

The other languages I know are Java and JavaScript mainly. They’re all C-based languages, so they’re all pretty similar with slight syntactical differences. Out of the three, the syntax of C# is probably my favorite, it does seem like a language that has had a lot of investment and is well thought out.

Are there any types of project / task that C# would not be a good choice for?

I would say if you’re building an application that needs to hosted in a non-Windows environment then C# is not the best choice. Since it’s a Microsoft .Net language, it requires the .Net Framework which exists mainly for Windows. When these aren’t available, it uses Mono which is a framework designed to allow developers to easily create cross-platform .Net applications. This is great because it means that you can write code for any platform, including mobile, but it also means that debugging can be pretty difficult if you are not building for Windows.

What do you particularly like about coding in C#?

I really like how similar it is to Java. In my day job, I use a lot of Java, so coming home and switching over to C# is really easy, except for the basic syntactical differences.

What are the things that frustrate you when working with C#? What possible sources of pain or frustration (if any!) should people be aware of before they start learning C#?

A personal frustration, as much as I love it is how similar it is to Java, it means that when doing the switch, I tend to forget a lot of the basic syntax, probably because it’s so similar. I’ll have to Google how to do a for loop, or I’ll start writing in Java syntax and not be able to figure out what I’m doing wrong!

What dev tools do you use when working with C#? What other tools are also popular?

I use a Mac to do my development, and I use Visual Studio. There are quite a few IDEs that you can use for C# development. I really like using Visual Studio, but if you want to choose an alternative there’s a really good break down of alternatives here: https://stackify.com/best-csharp-tools/

Press enter or click to view image in full size
As well as working as a developer, Charlene also co-hosts meetupandcode — it’s a lot of fun! You should join!

Which resources would you recommend for people looking to learn C#?

  • The online documentation for C# is really good, the tutorials on the Microsoft website are really useful, especially for Xamarin.
  • There’s a lot of code you can use as examples available, and a lot of contributors to the Xamarin libraries.
  • This will give you a really good introduction to C#
  • And there are a bunch of Quick Start Guides, starting with Hello World and moving onto collections and String manipulation.
  • Once you’ve got an understanding of C#, the Microsoft Xamarin documentation will get you building a basic cross platform mobile app using Xamarin.Forms

What are the popular libraries or frameworks that people should also consider learning with C#? What do these libraries / frameworks do?

I’ve mentioned Xamarin quite a bit which is a C# framework that will let you build cross platform mobile apps.

Get John Martin’s stories in your inbox

Join Medium for free to get updates from this writer.

For other frameworks that you may find useful, there is a lot of detail here https://msdn.microsoft.com/en-us/library/ms973806.aspx

Anything else you want to say about C#?

I really like C#, particularly lambda expressions. They enable you to write local functions that can be passed as arguments or returned as the value of function calls. They’ve been implemented really well in C# (especially compared to Java).

I also love writing LINQ queries.

Thank you so much Charlene! Where can people find you online?

Thank you so much for reading! I hope you found this article useful!

If you know C# and have suggestions for other resources that beginners should know about, feel free to leave them in the comments!

Other languages will be coming soon!

You can find me:

Instagram: @martinsoft

Online: https://martinsoft.net

I also co-host @meetupandcode, a regular meet-up in London for devs with any level of experience. Join us!

--

--

Written by John Martin

Full-stack developer with a focus on iOS. Founder and freelance dev @martinsoft. Passionate about all things Apple, and using tech to make life better.

Published in Martinsoft

Hello! Welcome to the Martinsoft blog! We share tech news, mobile app development stories, and help to make tech less daunting.