- to build C++/C# executables that are deployed to Windows computers. Examples are the millions of corporate desktops that already use Microsoft Office suite and home pcs with Windows for running AAA games.
- to build ASP.NET web apps because the corporation chose the Microsoft stack of WindowsServer+SQLServer+C# instead of Linux+MySQL+PHP.
Why do companies continue to use Windows instead of Linux? Often because they have lots of other desktop software that only runs on Windows. E.g. CAD, analytics, etc.
If the target audience is already on Windows and the implementation language is C++/C# instead of Javascript/Electron, the easiest path for the developer is to also use Microsoft Visual Studio on Windows.
I wish evey Lang had as good IDE as vs is
Xcode used to be good as well, but now it seems slow and crashes all the time. It’s a terrible ambassador for the engineering culture at Apple.
What exactly with VS is so great? Maybe I didn't use that feature..
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.
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.
I’d put it as an A tier language.
I did c, cpp and c# for money and thats my experience.
C# has lowest amount of WTFs per loc
(vim and a bash shell are all you need)