DEV Community

Cover image for Is C# Good for Beginners?
Nick Proud
Nick Proud

Posted on

Is C# Good for Beginners?

Are you a programmer looking to dip your toes into a new language? Or are you starting from scratch and trying to find the best language to cut your teeth on. Whether you are a fresh-faced junior or a hardened FORTRAN veteran, C# is a fantastic language for people who need a general-purpose, object oriented language. But despite it's reasonably low barrier of entry. it may not be for everyone.

Here are some key points on C# that may help you make a decision:

It's Not Just for Windows

Being a C# developer grants you membership of an extremely diverse and welcoming family of developers working within Microsoft's .NET Framework, a platform originally built by Microsoft to develop Windows applications that now following the release of .NET Core and more recently .NET 5, allows users to develop multi-platform desktop and mobile applications as well as fully realized web applications.

You can write the same app and publish it on Windows, Linux or Mac OS, and then if you want to, you can port the same app to a mobile version targeting iOS or Android.

The documentation provided by Microsoft is extensive, with most areas of the .NET framework having a 'getting started' page that will help you understand how to write apps for the various supported platforms.

Web Applications Made Easy

While a new JavaScript or web front-end framework appears every millisecond in the wild, Microsoft have consolidated the best parts of the top frameworks and now directly support them. You can run an ASP.NET back end in C# along with an Angular or Vue JS front end with extensive boilerplating and template projects to get your started.

What's more, Microsoft have released their own front-end framework for SPA (Single-Page=Application Apps) in the form of Blazor, which comes in two forms - Server and WebAssembly. Both allow you to easily abstract the front end of your site from the back end, with a server backend communicating with the front of SignalR, or with WebAssembly running in the browser. Microsoft has even teased their new 'native' features within Blazor for .NET 6, which should rival Electron in the way it allows you to convert web applications to native desktop applications. If you're a web developer looking for a way to get into writing desktop applications, this could be a good entry-point.

C-Style Syntax, Great if you Already Know Java

If you've already worked with syntactically similar languages like Java or JavaScript, you're in a great position to start learning C#. C# is particularly similar to Java in the way it looks. The main way it differs lies within the dependencies and libraries that you can work with out of the box.

C# is also object-oriented, and while it is often argues that Java is not a 'pure' OOP language, it shares very similar class relationship paradigms with C#.

VIDEO GAMES!

If you want to make video games, there are several well-supported game engines that are free to use and that support C#; one of the most popular engines being Unity. Unity uses C# as it's main scripting language and is often used by beginners to learn the language as well as make cool video games. Unity has an extensive tutorial set for getting started and YouTube is saturated with guides on how to become an indie video game developer with C#.

How High (Or-Low) Can You Go?

For the most-part, as C# is a languaged within a managed runtime, you don't need to worry about managing your resources as much as you would in a lower-level language like C or C++. However, with C#, you kind of have the best of both worlds. If you want to go lower level, the unsafe keyword is your friend, as it allows you to say 'hey, you know that managed runtime that is running a garbage collector for me and basically tidying my room on autopilot, yeah turn that off. I'm going rogue.' (Be warned - it can also be your worst enemy. Respect it as you would respect the sea)

What's more, if you want to really get into the guts of Windows specifically via C#, take a look at P/Invoke.Serious but powerful stuff,

An Amazing Community

C# is widely supported on StackOverflow. It has a huge amount of coverage within GitHub projects and now that Microsoft have open the gates to open-source contributors, it is easier than ever to get help from people online. At the time of writing, you could not only ask somebody about how a specific part of C# works under the hood, but you can even go to the GitHub repo for the Roslyn C# compiler (a compiler for C# that is itself written in C#.....which is pretty damn cool) and take a look at it's inner workings. Get good enough at C# and you could even contribute to the project yourself!

So Is C# for Me?

As usual, the really annoying answer is.....it depends. If you're an absolute beginner to programming, it's not the worst choice. It's taught in many colleges and universities around the world as they move away from the predilection for teaching Java. If you are a complete newcomer to the world of programming though, I might start with C#'s Great-Grandmother C, as it will teach you a very similar syntax and also give you a fantastic insight into how computers work on a low-level.

However, if you're relatively experience in another language like Java, Python or JavaScript, then C# is a absolutely a great next step. Not only for the reason that it will expose you to a new style of syntax and some more concrete OOP principles, but it will also allow you to cast your net wider in terms of the projects you build, bringing you closer to that goal of becoming the 'Full-Stack Developer,' a term that while being really difficult to property define, is often attributed to people who are experienced in C#.

Top comments (0)