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

-7 points

learn java, way more material for that, but conceptionally very similar to c#. I suggest a book like “Head first Java”.

after that c# will be much easier to grasp.

permalink
report
reply
1 point
*

Is java easier to understand than c#, for someone who only has some experience with scripting languages?

permalink
report
parent
reply
1 point

I personally find Java easier in the sense you have to get things done with pretty simple tools, while C# you have 10 different options for a problem.

Also makes it easier when looking at other people’s code since everyone uses the same basic tools.

permalink
report
parent
reply
2 points

no, i don’t think there is a big difference in ‘difficulty’ between both languages.

there is just more material for java, and as i said the languages are very similar, so learing to program in java wont be a waste of time if you plan to only use c# after that, because the concepts you learned a long the way will easily carry over.

permalink
report
parent
reply
4 points

C# is like Microsoft-branded java. No real difference in the language, but some of the tooling for java is worse.

permalink
report
parent
reply
8 points
*

I considered saying the same thing, but C# has been around almost as long as Java at this point, and I believe it’s commonly used for teaching, so I have a hard time believing there’s a shortage of learning resources. Starting with Java seems like a waste of time if your goal is to learn C#, because you can learn the concepts equally well in either language, but if OP starts with Java they’ll end up spending a lot of time unlearning Java quirks and APIs while learning the equivalent stuff for C#.

permalink
report
parent
reply
2 points

Not only this, but C# has diverged enough from Java that anything but the absolute basics isn’t going to help much with C#.

permalink
report
parent
reply
6 points
*

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

permalink
report
reply
0 points

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

permalink
report
parent
reply
4 points

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#.

permalink
report
parent
reply
1 point

We only created simple functions and reading from file in python, with def

permalink
report
parent
reply
2 points

I learned it because I had to write a WPF desktop application, so you could start with WPF tutorials. I was already very familiar with Java, which is very similar, so it wasn’t too hard. Last time I used it was in Unity. You might want to find a good free online course for C# to get a good grasp of C#/Java’s style of OOP, design patterns, and all that kind of stuff.

permalink
report
reply
2 points

Start with “absolute beginner” courses. Here’s one from Bob Taylor. He puts out a lot of good stuff.

Sit your self down and study it for a good bit, then build some things. https://youtu.be/0QUgvfuKvWU

permalink
report
reply
8 points
*

People seem to be misunderstanding your question. It doesn’t sound like you are lacking educational resources to learn C# but a lack of reasons. It sounds like you have been learning by getting you’re hands dirty with foss software.

C# is a sort of “enterprise-grade language” like Java. It’s meant for large applications developed by one or more teams for almost exclusively commercial purposes. If you want to learn it, deeply, you’ll have to come up with an excuse to write in it. A game is probably the best choice for this. Then learning c# is learning how to make your game.

If you’re looking for open source C# software to hack on you can try anything from the *arr stack. (Sonarr, radarr, lidarr).

permalink
report
reply

Programming

!programming@programming.dev

Create post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Community stats

  • 2.1K

    Monthly active users

  • 1.9K

    Posts

  • 31K

    Comments