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

  • @[email protected]
    link
    fedilink
    44 months ago

    C# was the first language I learned in school, there’s plenty of beginner resources for it on Youtube. You can also try some projects using Windows Form Applications (janky but fun) or the Unity game engine, which has tons of resources online.

  • @[email protected]
    link
    fedilink
    English
    12
    edit-2
    4 months ago

    Don’t learn a language unless you need to use it for something.

    That’s why you’re finding it hard. If you needed to program a game, decided on Unity, and had a specific thing to do, it would be easy to figure out how to do that in C#.

  • @[email protected]
    link
    fedilink
    44 months ago

    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.

        • @[email protected]OP
          link
          fedilink
          English
          1
          edit-2
          4 months ago

          I heard Watch Dogs uses C# too. Should i start modding these games, with mods that add additional logic? I only have experience with localization and texture mods

  • Caveman
    link
    fedilink
    44 months ago
    1. Make a text adventure game that runs in the console.
    2. Tic tac toe in the console.

    Then if you want to go for a GUI web app with react use “dotnet new react” and create a to-do list with a client/server setup.

    If you want to learn to make games you could make a tic tac toe again but with a GUI in Godot.

    Once that’s done make tetris.

    You research what you need right before you need it and use it immediately so it sticks better. You’ll need to get comfy with typing systems and I recommend using an IDE like Rider or Visual Studio to program it since they help out a lot.

  • @[email protected]
    link
    fedilink
    364 months ago

    one of the most popular languages, used in one of the most popular game engines, has no learning resources?

    Press X to doubt

  • @[email protected]
    link
    fedilink
    6
    edit-2
    4 months ago

    I found C# to pretty much be python just with strict types and semicolons. Jumped right into it really on my first job and it worked out pretty fine, granted I got to orient myself in the existing project where I started.

    You are perhaps already familiar, but some things stand out like public/private annotations and other class related things like interfaces which work to create a more organized and controlled use compared to pythons “we are all consenting adults” approach were nothing ever really truly blocked from you. It depends a little on what you want to do/use it for, there’s frameworks and different uses like WPF / .NET for the frontend.

    While it may be too basic for you, ZetCode was useful for me back when learning PyQt in python, so you might find some use with the C# intro: https://zetcode.com/all/#csharp

    • @[email protected]OP
      link
      fedilink
      English
      14 months ago

      You propably don’t know how bad i’m in C#. Basic console apps are giving me trouble. I think it is very different from python. Like nothing is the same, at all

      • @[email protected]
        link
        fedilink
        44 months ago

        I sure don’t sound helpful saying this, but it’s mostly about finding the equivalent to the python action/types, and typing them out when making functions and variables. Though 99% of the time, you are completely fine defining variables as var to avoid excessive typing.

        I assume you dealt a bit with classes in python, if not then you’re doing double time with both changing language and learning object oriented classes at the same time.

        If there is any specific I can try to give some clarity since I also came from Python to C#.

          • @[email protected]
            link
            fedilink
            14 months ago

            Then you have a bit more to do yeah, you should look into object oriented programming and classes. Classes are pretty much everywhere in C#. At the beginner level they aren’t as bad as they seem but you need to understand it’s basics. The guide I linked in another comment also has short introduction to using a class for example.

  • @[email protected]
    link
    fedilink
    English
    13
    edit-2
    4 months ago
    1. Start writing a small game in Godot using GDScript (basically Python)
    2. Use the Godot docs to read about C# alternatives to GDScript as you go, compare them and see how they differ
    3. Translate bit by bit of your game to C# using the docs
    4. Congrats, you have written a game in C#
  • @[email protected]
    link
    fedilink
    164 months ago

    It sounds like you’d benefit from having a project in mind. I always learned programming languages by building something I wanted, or by tinkering on someone else’s project.

    • @[email protected]OP
      link
      fedilink
      English
      54 months ago

      That could be good in the future but i struggle with the basics too. I look at source code and have absolutely no idea what it does

      • @[email protected]
        link
        fedilink
        14 months ago

        It sounds like you either have not integrated ChatGPT into your life yet or you’d never think of asking a tech-tool tech-related questions.

        All my code in the last year has been written up by AI. Sure, for now you still need to know what you’re doing, the code pretty much always needs adjustments, but your first draft is never farther than one LLM query away.

        If you tell him what you just told us, like “I’ve spent months and all I can do is parse some values, what could I code to expand my horizon?” you will have new angles in minutes and all key lines of the code will be explained to you.

        • @[email protected]OP
          link
          fedilink
          English
          2
          edit-2
          4 months ago

          Using AI is cheating and no teachers like it. We are ecouraged to learn entirely without any LLM or similiar. Sure, i could pull it off, when the teacher is not watching, but that’s very risky

          • @[email protected]
            link
            fedilink
            24 months ago

            I thought you were learning by yourself. If you have a teacher/class and you need to consult the internet for advice that probably doesn’t bode well for your teacher’s performance.

            I’m not suggesting to use AI to cheat on a test or something, even with the existence of AI we should still try to build our own knowledge and understanding. But I mean if you got some homework or whatever and you feel like your understanding should already be further developed why not ask an advisor which has time for you 24/7? What counts is your own progress and nothing else. The goal isn’t to let AI do the work and be done with it but to gain an understanding which your teacher seemingly couldn’t convey to you.

            • @[email protected]OP
              link
              fedilink
              English
              14 months ago

              Ah ok, i understand. I sometimes ask AI to explain it, i try to memorize the explaination and write it

      • @[email protected]
        link
        fedilink
        124 months ago

        Code is overwhelming. Even experienced professionals hate diving in to somebody else’s code. It’s scary, poorly documented and we always think we could have done it better.

        Don’t let that put you off.

        A lot of us are practical learners. So like you we stare at a wall of code but struggle to comprehend it. But if you dive in and start editing, experimenting etc you’ll change the output and understand why it was written in a certain way.

        Eventually once you’ve got it sussed you’ll be able to adapt a script to do what you want it. That’ll trigger the dopamine reward mechanism and you’ll be hooked like the rest of us.

        • Chris
          link
          fedilink
          English
          14 months ago

          The comment above stands on its own. Code can be overwhelming - start by going through an existing program and write a comment for every single line - describing exactly what each line does. You’ll pick it up faster than you think.

  • Kogasa
    link
    fedilink
    54 months ago

    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

  • @[email protected]
    link
    fedilink
    44 months ago

    Starting with Visual Studio (not code) helps a ton. Make a simple winforms application with a button and some labels and you will start to see how it ‘starts up’ from program.cs to your form.

  • Rimu
    link
    fedilink
    English
    5
    edit-2
    4 months ago

    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.