A post I’ve been avoiding for several years, mainly because both this blog and my YouTube channel are focused on C#, so you can imagine how it turns out.
But I keep getting more and more questions, especially from those who are starting or about to start, about whether C# or .NET is worth it. In this post I’m going to share my opinion and the reasoning, and as always, I’ll try to be as unbiased as possible, both the good and the bad.
Index
1 - The State of C# and .NET
First, let’s talk about the framework itself. What is .NET? .NET is a framework and C# is a language (like F# or VB) that runs on this framework. This website and my channel mostly focus on C#.
When you see job offers and they list .NET, more often than not it’s about C#. In fact, in about 85-90% of cases it means C#. But we’ll talk more about the job market later.
.NET itself can actually be split into two:
.NET framework
: These applications are now called “Legacy.” While .NET Framework still gets updates, it isn’t anywhere near as active as the other version. When you hear online that with .NET you are forced to use Windows and that it’s proprietary code, etc., they’re talking about .NET Framework..NET (core)
: The current version, first released in 2016, now at .NET 8. These apps run on the modern system, are lighter, open source, cross-platform, and you can develop for them on any OS. I have posts with examples for Linux and Mac (Apple Silicon).
That’s the summary. If you want more details on the versions, check out this link where I discuss all .NET versions, and the bad decisions with the naming.
Although I don’t cover it on this channel, Azure has full support for everything .NET-related, which is why a lot of companies choose C# for the safety net Microsoft provides.
2 - Ecosystem and Community of .NET
To me, this is one of the fundamental pillars. In my experience, we have an ecosystem better than any other. I’ve worked with multiple programming languages in my career like PHP, Ruby, Go, countless JavaScript frameworks, and like everyone in Spain, I studied Java.
Personally, I find working with .NET the simplest of all. The tools available, both by Microsoft and third parties, are incredible and make your life much easier.
Working with .NET or doing a hello world
is as simple as downloading the .NET version and Visual Studio, all nicely explained on the Microsoft site, or on my blog, of course.
Microsoft releases a new version every year with updates. With each version, there are improvements in both performance and features, here you can see what changed in .NET 8 in November 2023.
Speaking about C# in particular, it has almost every feature you could want (except for discriminated unions), and pattern matching is a huge focus these days, an awesome feature.
Also, .NET has what’s called the .NET Foundation, a set of libraries under its umbrella. When a library gets very popular, it’s invited to become part of the .NET Foundation and receives resources for development, mainly funding, or sometimes Microsoft staff lend a hand, which helps keep libraries up to date.
As much as it pains me, Microsoft has its own academy, with some advanced topics and real-life use cases. Which isn’t great for me since it overlaps with what I do on this channel, it’s about time they called me in. Oh well.
Finally, in my view, in general people online are really helpful with questions and realistic when it comes to comparing C# with other languages. That’s not always the case in other communities, cough, Ruby, cough.
3 - Real World Use Cases
Now let’s get serious, where can you use C#?
Literally everywhere. As I said above, since .NET Core, you can run your code on any platform: web, desktop apps, or games (Unity is super popular), to mobile and any IoT device.
That means its use cases are pretty much endless compared to other languages.
To get more specific, .NET is extremely popular with government systems around the world, partly thanks to Microsoft being behind it. Healthcare and fintech are also areas where .NET is very, very popular.
That’s in general terms, but of course any company could potentially use .NET. Just to mention, I’ve worked with travel agencies, warehouse companies, fintech, and more.
One of .NET’s main features is that it scales, and very well and cheaply, thanks in part to Microsoft’s focus on reducing load times, improving internal packages, and of course, making .NET run on Linux, which has been a blessing for those of us whose apps handle 60-100 thousand requests per minute. That’s 80-144 million per day.
Of course, with unlimited money anything scales; the point is to do it cheaply, which is possible with .NET.
3.1 - C# VS Other Languages
You can compare .NET to other languages, and they can basically be grouped:
Generally, the top group gives you faster development, especially Ruby, which is a love-hate relationship for me.
Ruby is super fast for development, but performance is terrible. JS performance isn’t as bad, but still doesn’t compare to the second group like Java or C#. In this first group you have interpreted languages.
The second group, the compiled or semi-compiled languages, compile C# (or F#, or VB) into IL (intermediate language) and Java into Bytecode, both are then run by CoreCLR or the JavaVM. These convert the code to machine language at runtime.
That brings advantages such as code efficiency or excellent memory management, as both have very good garbage collectors built in.
Finally, purely compiled languages like C/C++ or Rust, which are very efficient if coded well, but that’s tricky and time consuming. Of course, you gain that time back when the app runs, but these languages tend to be used when you absolutely must have performance or hardware-level control, or both.
Choosing the right language for each scenario is crucial. For example, C# or Java are great for enterprise applications, lots of employees, lots of features to maintain.
Ruby is great for startups since you can build features super quickly, which is crucial (though they’re usually a bit hacky) when launching a startup.
C is ideal for apps that have to run super efficiently, think the Linux kernel or databases; all of those are implemented in C.
4 - The Job Market for C#
Finally, let’s talk about C# and job opportunities.
As you’ve probably gathered from the above, there are tons of sectors that use C#; so the job opportunities are huge, on par with other large languages or frameworks.
Personally, I’ve never had trouble finding a job in C#, and since it’s so popular with big companies, there are many spots for graduates or juniors, which is almost impossible for C or Rust.
The fact that C# has such a broad ecosystem lets you focus not only on backend or desktop apps, as was popular before 2015, but now we have mobile apps or a web framework like Blazor if you’re interested in web development.
For these reasons, I think starting your career with C# is a great idea because it gives you the flexibility to move, from backend or fullstack (with Razor) to almost anywhere, which opens many doors, and that’s the most important thing.
Finally, I should mention I’ve been working remotely since before the pandemic, which may be important for some of you.
Cheers!
If there is any problem you can add a comment bellow or contact me in the website's contact form