1. Most consumers using Windows. That might not be the case in USA, but definitely the case in the most of the world.
2. To develop for a platform, primary choice would be platform creator recommendation. In this case it's obviously .NET from Microsoft Visual Studio. It contains extensive UI libraries and components.
There are alternatives, of course, you can use Qt or Electron or just web app. But you would need a good reason to move from the primary path. For many projects there's no good reason, so you naturally using .NET to write GUI applications for Windows.
3. To develop .NET GUI applications, you need Windows. Any other option is inferior.
That was the case 10-20 years ago. So plenty of projects were created and plenty of developers were taught .NET and Windows.
Today web apps are more popular. But .NET provides excellent support to create web apps, so there's no reason to switch from Windows.
That's why many professional developers use C# even today.
Of course different people might move different paths. But I think for majority that's the way. .NET GUI frameworks and may be Sharepoint created huge number of Windows developers.
I was just following the running gag, but thanks anyway. I did a bit of C# when, as a sysadmin, I was asked to do some kind of frontend that would hide the pocket pc interface so that employees in an hospital can use those pocket PC to order menus for the patients and not end up using them to browse shit or install unwanted apps.
Security by obscurity in all its glory but they used to do the same with a very easily escapable panel replacing the default windows shell in Win95 and Win98. :)
Fast enough for most applications. Memory safe enough. Easy enough to learn. Good enough type system. And it helps that it’s integrated into unity and windows. Also the ecosystem, compiler and IDE support is exceptional.
It’s not perfect. It’s slower than native code. It has a worse type system than rust, Swift and typescript. (Burn the nulls!) And C# needs a runtime - which makes it annoying to deploy on Mac & Linux.
ARC and shared_ptr are net more expensive than GC, in throughput scenarios you will see that C++ often offers no meaningful performance advantage. Also Swift is significantly slower due to upfront ARC cost and defaulting to virtual dispatch in many places, more so than .NET with interface spam (Dynamic PGO takes care of it anyway).
Nulls have stopped being an issue in practical terms since you specify nullability explicitly e.g. string?/string.
C# does not need runtime installed on the host. You can produce JIT or AOT executables which include one. It also needs runtime on Windows just as much (if you don’t include it or host doesn’t have it installed). Only .NET Framework was preinstalled but no one (sane that is) chooses this legacy target for new code.
In short, nowadays it's a pretty strong contender and can fill in similar niches to Java (decent type system, good runtime, good tools, nowadays available on most platforms), with downsides that to me don't seem like dealbreakers (not as big of an ecosystem, which leads to breakages along the way when tools and libraries aren't as well maintained).
I've also used Node, Python, Ruby, PHP, a bit of Go and some others on the back end, I'd say that it's a bit slower to develop in than many of those but the performance and maintainability of the code (especially the refactoring you can do in the IDEs) feels worth it. Maybe for not quick MVPs, but probably for multi-year projects.
> I did c, cpp and c# for money and thats my experience.
>
> C# has lowest amount of WTFs per loc
Sure, C# looks great when compared with C or C++, but that's a very low bar to pass. Compare it with Java, and it's on par at best. Compare it with Rust, and C# might as well be C.
1. Most consumers using Windows. That might not be the case in USA, but definitely the case in the most of the world.
2. To develop for a platform, primary choice would be platform creator recommendation. In this case it's obviously .NET from Microsoft Visual Studio. It contains extensive UI libraries and components.
There are alternatives, of course, you can use Qt or Electron or just web app. But you would need a good reason to move from the primary path. For many projects there's no good reason, so you naturally using .NET to write GUI applications for Windows.
3. To develop .NET GUI applications, you need Windows. Any other option is inferior.
That was the case 10-20 years ago. So plenty of projects were created and plenty of developers were taught .NET and Windows.
Today web apps are more popular. But .NET provides excellent support to create web apps, so there's no reason to switch from Windows.
That's why many professional developers use C# even today.
Of course different people might move different paths. But I think for majority that's the way. .NET GUI frameworks and may be Sharepoint created huge number of Windows developers.