DEV Community

Dayvster 🌊
Dayvster 🌊

Posted on • Updated on

Is C# worth learning in 2019?

Well is .NET still worth learning in 2019?

The short and boring answer would be, yes. But I assume you're not here for a quick and boring answer, are you? You're probably
here because you are considering which language to learn in 2019. Or maybe you're a greenhorn and would like to dip your toes into
the vast waters of programming. Well in this article I'm going to try and convince you to give C# a try.

Exciting time for C

Just a few weeks ago we were figuratively blown away by some of Microsoft's announcements regarding windows, .NET and C#. Chief among them
being:

  • Fluid web framework that aims to make the web a more productive and interactive place
  • Windows terminal inspired by it's linux counterparts, aims to improve developer efficiency
  • a full linux kernel within Windows with WSL 2.0
  • KEDA and event driven scaling extension for Kubernetes
  • IOT Plug and Play does it need more hype than that?
  • Machine learning for .NET named ML .NET 1.0
  • and much much more

in short, it's an exciting time to be a .NET developer whether you already have a background in coding or you are just entering the field.
A world of opportunity career and otherwise awaits you.

Game Development with .NET

C# has always been a favorite of game developers worldwide, and it strikes a good balance between performance, low level, oop and easy of coding
with some syntactic sugar gently sprinkled in πŸ₯ πŸ’₯ . Now here's a fun statistic almost half the games are made using Unity 3D

unity statistic

Now I am fully aware Unity 3D supports both Javascript and C# as their programming languages. However, one can assume a vast majority of devs
opts for the language that sacrifices less performance, which would, of course, be C#.

With Unity 3D you can create anything from Mobile, PC, and even VR games. So if you're looking to make your future in game development
look no further than C#.

Rich Job Market

.NET has been a highly sought after skill for well over a decade now. Just a quick search for .NET jobs on Monster.com gives us a staggering
result of 30155 Jobs Found. While average salary statistics show that C# developers are still amongst the highest paid developers out there.
So you shouldn't have too much trouble finding employment in the field nor will you go hungry or wanting.

bugs money

Backed by Microsoft

Hate them or love them they are undoubtedly one of the largest and most successful companies in the tech world. One thing Microsoft
was always good at was making sure their development ecospace is of top quality. You can be sure that tools such as Visual Studio and Visual Studio code will
work effortlessly with your technology stack. You can also rest assured that the language and framework will be regularly updated and kept simple and concise for many years to come.

bill gates dancing

Not just Windows anymore, it does Linux and Mac now too.

Since the release of .NET Core 1.0 Microsoft has been putting in a lot of work trying to open source as much of their stuff as possible.
With that finally came official support for Linux and OSX, which means you can now use official C# libraries on Linux or a MAC without having to
resort to using Mono. This means you can have the best of both worlds a fast and efficient Linux server with lighting fast C# running your websites, webapps or services.

speaking of which...

It's BLAZINGLY fast

And I mean FAST, it still outperforms Java, NodeJS and most of the competition, the only languages that can boast about being more resource friendly and therefore fast would be
C, and C++. However, their speed and performance come at a price. In both of them, you have to take care of memory management and trash collection yourself. While C# has a built in trash collector that
Does a pretty damn good job of cleaning up after itself πŸ₯ πŸ’₯.

super fast

it comes with built in pun functionallity

Don't believe me observe:

Why do Java developers wear glasses

because they can't C#

Native mobile application

By using Xamarin you can write fully native mobile applications for both Android and iPhone without having to support two different codebases.
This enables you to develop your mobile apps faster and more efficiently. The only thing you need to figure out now is how you're gonna spend all that extra time you'll have.
I heard the outdoors are supposed to be good for you.

C# is multifunctional

With C# you can write anything from games, mobile apps with Xamarin, desktop applications, web applications, websites and webshops. There are only a few languages out there that are that multifunctional
and none of them is as clean and nice to look at as C#.

Top comments (60)

Collapse
 
jwp profile image
John Peters

Growing up on .NET, I became a bit biased. I love C# and ASP.NET core. In the meantime Angular and React took over the front-end world, and Node and Express are working to create the Isomorphic stack. If I were a new programmer I'd skip C# and Java and learn server side Javascript using Node and Express.

Collapse
 
yerac profile image
Rich

server side Javascript

This still sends chills down my spine whenever I hear it!

Collapse
 
jwp profile image
John Peters • Edited

Ya, I'm sure, just like we (C# and Java people) laughed at Javascript back in 1990.

Collapse
 
dayvster profile image
Dayvster 🌊 • Edited

While I can see where you are coming from, I have to point out that the always async nature of Node.js is a pretty big issue for beginners, furthere more I personally find that Nuget packages are much better maintained and in better hands than the vast majority of npm packages.

Especially when we consider that the most important nuget packages are all created and maintained by Microsoft themselves, whereas NPM packages are mostly created and maintained by random developers that can stop maintaining or cause comparability issues for various reasons.

Collapse
 
seanmclem profile image
Seanmclem

As a long-time user of .Net and recent JavaScript full stack developer with node, it is my opinion that nuget packages are pretty difficult to work with compared to npm packages. These days there are a greater variety of simpler to use npm packages than there are nuget packages. Again, just my personal experience

Thread Thread
 
dayvster profile image
Dayvster 🌊

I actually wrote an article covering this very topic over here: dev.to/arctekdev/the-contenders-202d

While it's true that NPM has a greater choice of packages they are all for the most part maintained by third party developers. This means that at any given moment a spat between two developers could cause conflicts between their packages, or the package you relly on could simply stop being maintained all together, or completely changed for no reason at all.

On the otherhand you have fewer choices with nuget but a large portion of the most important nuget packages are maintained and created by Microsoft themselves, meaning that you have a greater sense of stability and trust that those packages will exist and function as intended for the next 10+ years.

Thread Thread
 
mateiadrielrafael profile image
Matei Adriel

Most big npm packages have a team of multiple devs behind them. Also, the async stuff from nodejs was inpired by c# (async / await)

Thread Thread
 
jwp profile image
John Peters

Matei, very interesting! Tx.

Collapse
 
jwp profile image
John Peters

Artec wrote "important nuget packages are maintained and created by Microsoft themselves, meaning that you have a greater sense of stability and trust that those packages will exist and function as intended for the next 10+ years."

All true as long as MSFT doesn't throw us under the bus. Like they did for SilverLight, WPF (which was never completed), their ridiculous fractured desktop environment (UWP) and now .NET. Sure .NET Core is going to be good, but didn't Java say in 1991 (build once run anywhere)? Microsoft just learned that lesson starting with their .NET Core concept a few years ago ~

Collapse
 
nstefan profile image
n-stefan • Edited

Whyever?

Latest TechEmpower results as of the time of posting this:
techempower.com/benchmarks/#sectio...
As you can see, Node.js is so far behind ASP.NET Core in all tests, it's not even a contest any more.

As for front-end C#, here's an example: n-stefan.github.io/diabloblazor
It is a port of this: d07riv.github.io/diabloweb
replacing React/JavaScript with Blazor/C#.
Being static it doesn't use a server at all, but server side prerendering (initial rendering) is baked into Blazor and can be used with sites that are hosted by an ASP.NET Core server. There's also server side Blazor, which doesn't need WebAssembly and still behaves like a SPA/PWA - no full page reloads, uses differential rendering, etc.

Edit: added further benchmarks
.NET Core/C# wins 10/10 tests vs OpenJDK/Java:
benchmarksgame-team.pages.debian.n...
At the same time OpenJDK/Java wins 9/10 tests vs Node.js/JavaScript:
benchmarksgame-team.pages.debian.n...

It should be noted that both the TechEmpower tests and these benchmarks were run on Linux. On Windows .NET Core/C# would likely be even faster.

Collapse
 
mustapha profile image
Mustapha Aouas • Edited

It's BLAZINGLY fast
And I mean FAST, it still outperforms Java, NodeJS and most of the competition

Do you have some benchmarks between C# (asp) and node.js ?

Collapse
 
dayvster profile image
Dayvster 🌊

No, nor should you worry too much about benchmarks between languages/platforms/frameworks and so on.

They are one of many matrics.

I cover this exact thing in my other post: dev.to/arctekdev/the-contenders-202d

Where I discuss how small percentage differences in resource usage usually do not matter when you are developing out in the real world, because no developer always writes perfect code in a perfect way. And even if they do that developer would be a lot more expensive per year than simply buying a new server.

Collapse
 
mustapha profile image
Mustapha Aouas

I'm just trying to find what makes you say that it outperforms Node?

Thread Thread
 
dayvster profile image
Dayvster 🌊 • Edited

You are not listening, focusing on benchmarks and it's minimal performance differences is not a good idea as it's an unimportant metric in most cases.

But if you wish: ageofascent.com/2019/02/04/asp-net...

techempower.com/benchmarks/#sectio...

This one is a year old and I'll go out on a limb and assume not too much has changed in a single year.

As you can clearly see .NET outperforms NodeJS in most categories.

Not a surprising result to be perfectly fair.

Thread Thread
 
mustapha profile image
Mustapha Aouas • Edited

Stop being condescending please. I don't care that much about benchmarks but I'm looking for the proof behind what you said:

It's BLAZINGLY fast
And I mean FAST, it still outperforms Java, NodeJS and most of the competition

Btw, are we not seeing the same result or something? because it seems that it's quite the contrary, we clearly see that node outperforms aspnet on must of the benchmarks, here's one (of many) as an example:

node outperforming aspnet

Multiple queries benchmark (higher is better)
Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
sketchydev profile image
Shane Booth • Edited

If we take Round 18 from TechEmpower and adjust the filters to add aspnetcore we get some different results which are very much in favour of aspnetcore

Thread Thread
 
dayvster profile image
Dayvster 🌊

Shane Booth I'd recommend not feeding the troll much more, he appears to be a bad faith actor.

Thread Thread
 
sketchydev profile image
Shane Booth

Agreed - i'll leave it there :)

Thread Thread
 
mustapha profile image
Mustapha Aouas • Edited

I politely asked you to give some proof, how does that make me a troll ?

And how am i of bad faith since i used the link that you gave me?

Thread Thread
 
mateiadrielrafael profile image
Matei Adriel

Im pretty sure i saw some version of nodejs running on the jvm which outperformed c# in all categories but i cant find the link rn (when ill do ill post it here)

Thread Thread
 
algonzalez profile image
Al Gonzalez

What is faster is ASP.NET Core with Kestrel. Open the filters and enable "Kestrel" in the "Front-end server" section and then make sure "asp.net core" is enabled in the "Framework" section. Make sure to click on the "Apply changes" button.

Collapse
 
sketchydev profile image
Shane Booth

skylinetechnologies.com/Blog/Skyli... I'm struggling to find a more recent benchmark on nodejs vs net core, though.

Collapse
 
mateiadrielrafael profile image
Matei Adriel

Well, nodejs isnt that great for heavu computations, but its awesome when talking about a lot of concurrent requests

Thread Thread
 
sketchydev profile image
Shane Booth

NodeJS is good for multiple requests, no doubt about it, the benchmarks on TechEmpower(which are linked to in other comments)do suggest that netcore is more performant however. But then again, performance alone shouldn't be the deciding factor on choosing a tech stack.

Collapse
 
dayvster profile image
Dayvster 🌊

I suppose I could try running some when I get home, that is if I don't have too busy of a day at the office.

Basically saying no promises but I'll try and keep it in mind.

Thread Thread
 
nospower profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
Jon Knowles

I normally never reply to any posts online, but wanted to say thanks for this article. To the troll: if you don't agree with the post, read something else, or watch some porn and you'll feel much better

Collapse
 
aethelflaed profile image
@_Geoffroy

the only languages that can boast about being more resource friendly and therefore fast would be
C, and C++. However, their speed and performance come at a price. In both of them, you have to take care of memory management and trash collection yourself.

In C++ you can take care of that yourself, or you can use dedicated smart pointers, which takes care of it for you.

And it would be nice to note that only the .Net core is available for Linux. You can be as experienced as you want, but you'll still have problem finding jobs because of the confusion between the core and the framework. IMO that's on purpose, so it's really a bit far-fetched to say it works on Linux...

The programming language with the basic library? Yeah. The whole system? Certainly not.

Collapse
 
mburszley profile image
Maximilian Burszley • Edited

that's on purpose

Why do you feel that? The project started out as providing a core framework that works across all platforms. .NET Framework is being sunset in favor of .NET Core (and post-2020, just .NET 5+)

you'll still have problem finding jobs

Jobs are a-plenty depending on your market. No, they're probably not in Silicon Valley startups where everyone's on the js binge, but in other markets, the positions are flourishing (surprisingly to me, the Midwest).

The programming language with the basic library? Yeah. The whole system? Certainly not.

What do you feel C#/.NET are missing? Your comment is missing a lot of context.

Collapse
 
mburszley profile image
Maximilian Burszley

The entire .NET Framework has been ported into .NET Core

Before 3.x which just released a month ago, this was plain not true. You did not have access to various GUI frameworks and some more niche items.

all knowledge of .NET Framework is transferable to .NET Core

Also missing nuance. If your workflow was using Visual Studio for everything, you didn't have much knowledge of cli tools. Using the cli can be pretty important for .NET Core.

Collapse
 
jonasbarka profile image
Jonas BarkΓ₯

Javascript in Unity (Unity script) has been deprecated since 2017. C# is the only official scripting language, at least until the planned visual scripting is released.

Collapse
 
dayvster profile image
Dayvster 🌊

Really? I haven't developed/played with Unity in ages. I was not aware of this.

Collapse
 
daniel15 profile image
Daniel Lo Nigro • Edited

only languages that can boast about being more resource friendly and therefore fast would be C, and C++.

For what it's worth, the .NET Core team have started rewriting some of their C++ code into C#, which in some cases has actually made it faster.

A lot of that speedup is due to being able to avoid marshaling data between managed (C#) and unmanaged (C++), but it's still worth noting that just because some code is written in C++, doesn't mean it's faster than C#. The C# JIT can do some advanced optimizations at runtime that aren't possible with a language that compiles directly to machine code with no JIT compilation.

The Kestrel web server for .NET Core is faster than both Nginx and Node.js, even though Nginx is written in C while Kestrel is written in C#. techempower.com/benchmarks/#sectio...

Collapse
 
hnnx profile image
Nejc

Short version: Yes

Collapse
 
dayvster profile image
Dayvster 🌊

That's about the jist of it yea.

I often get asked by other developers or better yet accused of working on legacy software or webapps when I mention that I'm a dotnet developer.

Collapse
 
mburszley profile image
Maximilian Burszley

.NET Core 3.x 😎

Wonderful improvements

Collapse
 
maxiakovliev profile image
Max

Actually ASP.net core really outperform Node.js:
here is proof link:
techempower.com/benchmarks/#sectio...

Collapse
 
sakko profile image
SaKKo

I never used .NET in any of my project so in my opinion it's not really about the language. There are many other alternatives, and you should choose them according to your need. Nodejs, ruby, python, c#, etc..., they are all have the good and the bad.

Collapse
 
dayvster profile image
Dayvster 🌊 • Edited

I fully and whole heartedly agree with that sentiment.

There is the right tool for every job. However with languages like C# and Java that have a high level of flexibility in terms of where you can use them and what you can create with them. The golden hammer problem becomes more and more likely.

That is that with a golden hammer every problem becomes a nail in your mind and you only wish to use your shiny golden hammer.

I usually like to steer clear of tribal language/framework/library arguments and comparissons and instead like to simply highlight differences between the languages themselves.

I found that this makes people focus a lot less on asking "what's better" and a lot more on asking "what would I rather use" or "what would suit my needs better at this moment"

EDIT: Sorry for the wall of text. I try to avoid them as much as possible.

Collapse
 
mateiadrielrafael profile image
Matei Adriel • Edited

I mean, for me personally the golden hammer is nodejs w typescript

 
aethelflaed profile image
@_Geoffroy

Hey, I precised it was my opinion, and didn't try to say anything negative, I was just surprise to see this post as #opensource and was reacting with the best of my knowledge, without trying to be rude with anyone.

If I can't comment anything, what's the point of commenting anything at all?

And it's really not like I hijacked another comment thread, I started a new one, so really, why are you so butt-hurt?

Read my post again, with the knowledge that I didn't know about this new release, and you'll clearly see that I'm not really criticizing anything, just commenting about something that was clearly my own opinion (as expressed by the common idiom "IMO"), and as soon as I learned about my lack of knowledge on this subject and my actual error, I expressed it also.

So now if you don't want people to express any kind of opinion at all, why are you even on internet?

Collapse
 
hte305 profile image
Ha Tuan Em

I love C#. Because it's easy for building application to QUICKLY. At the moment, I am building cross-platform with .Net Core for server (maybe Restful API or GraphQL) and React client for web, React Native for native mobile app. It's very useful.

Collapse
 
ryanthedev profile image
ryanthedev

Java is horrible. I'm a full time Sprint boot webflux Java dev and asp.net core dev. I have also built production apps in angular/react with a node backend.

Unless Java creates an async await keyword, it's not worth it.

.net core has been on fire. If you care about performance and don't want to roll Go, go .net core.

Collapse
 
pareshjoshi profile image
Paresh

If you think it will add value to your career** (this is very subjective though) and the community, then yes, it is worth learning. I have 12 years of experience as C# Developer and have seen evolution of C# during these years. There are many resources available and the language is easy to learn. That said, we shouldn't compare it with other languages, as there is no one size fits for all. For example, Python has more tools available for ML and golang is being adopted widely for distributed systems. As Industry is moving more towards API-first approach, I believe, we now have more choices on selecting right language for right task. Apps can be built all in C# or mix of multiple languages.

To conclude, I agree - C# is worth learning in 2019, 2020, 2021 and for next few years to come.

Collapse
 
manning0218 profile image
Brandon Manning

It should be noted that modern c++ makes memory management a lot easier with the use of smart pointers. I know it's been a part of boost, but being part of the standard is much more convenient. I think C# is still a great language, but that price to pay to use c++ more has to do with not having as many built in libraries. And with vulkan, low level development for graphics is becoming big again. It really depends what you want to do with your career. I still see a lot more jobs for Java then .NET, but a lot of companies are now wanting to use golang.

Collapse
 
cyberprogs profile image
CyberProgs

I really don't like the way developers talking about single technology/tool as a golden hammer, I can't even imagine someone comparing C# to JavaScript, they are totally different, each one has its own purpose if you have heavy IO operation go with Node.js if you have complicated business and need a decent architecture go with C# ..etc

Some comments may only be visible to logged-in visitors. Sign in to view all comments.