Skip Navigation

How am i supposed to learn C# ?

I have some background in Python and Bash (this is entirely self-taught and i think the easiest language from all). I know that C# is much different, propably this is why it is hard. I've been learning it for more than 4 months now, and the most impressive thing i can do with some luck is to write a console application that reads 2 values from the terminal, adds them together and prints out the result. Yes, seriously. The main problem is that there are not much usable resources to learn C#. For bash, there is Linux, a shit ton of distros, even BSD, MacOS and Solaris uses it. For python, there are games and qtile window manager. For C, there is dwm. I don't know anything like these for C#, except Codingame, but that just goes straight to the deep waters and i have no idea what to do. Is my whole approach wrong? How am i supposed to learn C#? I'm seriously not the sharpest tool in the shed, but i have a pretty good understanding of hardware, networking, security, privacy. Programming is beyond me however, except for small basic scripts

85 comments
  • Start with the goal to create something, be it a console app, website, web api, or game. It's hard to just study a language abstractly and learn it. Use the Microsoft Learn documentation as reference, and look for open source .NET projects on GitHub to get different perspectives on how to build things with .NET. There is a free course on freecodecamp that will get you started by building an app, and I believe it was done in partnership with Microsoft

  • For bash, there is Linux, a shit ton of distros, even BSD, MacOS and Solaris uses it. For python, there are games and qtile window manager. For C, there is dwm. I don't know anything like these for C#, except Codingame

    It seems like you find an environment that requires the language and then kinda sink-or-swim? If so then yes, your whole approach is wrong. You need a process with a lot more structure. Get a Udemy course or a book from the library.

  • I have a Python background and I'm learning C# right now. Unity development is done in C# if your interested in games or 3D applications. There's a ton of resources for that kind of think out there and I find its a fun context to learn in. I've also had decent results recreating tutorials written for other languages using LLMs. Just start with step 1 as a premise and state the overall goal, then ask for incremental changes at each step an ask questions and for alternate solutions. Just watch out for those hallucinations.

  • My first projects were super janky gui stuff that was ported over from Java (very similar syntax, but connected with the visual studio built-in gui editor) and improved to a proper "c#" style using resharper (a jetbrains tool that boosts the capabilities of visual studio) Nowadays you can get a free version of Rider that will include those style tools, so I'd recommend that. But if you use Visual Studio, you can create a Winforms project which can let you drag components to make UI and easily assign code to events. If you are used to raw HTML webpage creation, you might be able to get away with using something like WPF or (cross platform) Avalonia to make a UI, but these are a bit more intense since they use something called the Model-View-Viewmodel framework. It needs you to know how to 'bind' variables to events using the observable class, which can be tricky the first few times you use it. I'd look into picking a simple project where you can learn how to use classes effectively (C# is based around Object Oriented Programming much more than bash and self-taught Python would cover). Also would recommend following some of the very simple Unity tutorials to get a handle on the syntax, such as the Unity-made Roll-a-Ball tutorials. These tutorials show the concepts for class-based design and overriding functions.

  • Jumping from loose-typed language to strict-typed language will be hard.

    It's also a matter of your general programming experience. Once you write, like, ten thousand lines of meaningful code in Python, learning C# should take you a month or two at most, you'll know most programming concepts and algorithms intrinsically, and the rest is just learning syntax.

85 comments