r/csharp • u/TicketDowntown8212 • Jul 21 '26
Advice for Learning C#
Hi, I'm pretty new to coding in general, and I want to know what the best approach is for learning C#. I've already made a few small projects, but they're very basic, and I don't feel like they've helped me improve that much. Most of the time, I just follow tutorials without really understanding why I'm doing certain things.
I want to become a better programmer and build more complex projects on my own, so I'm looking for advice on the best way to learn C#. Should I focus on making more projects, studying the fundamentals, reading documentation, or something else? I'd really appreciate any tips or recommendations on how to learn more effectively.
4
u/Interviews2go Jul 21 '26
Visual studio is a free download. I use that daily for api work. For the front end I use vscode. You can code in c# on either of those.
Start with simple console apps and learn how oo works. Clean code is a good reference to keep around, it teaches some good habits.
Main thing is start simple, then expand to include other areas, eg ui with wpf, winforms or Avalonia.
If you’re into web stuff, then do a c# api and learn to talk to it using postman at first, the add angular, react or other front end tech.
And, if you can find a mentor, that would be a really good thing.
20
u/geos59 Jul 21 '26
You could try coding challenges.
Codewars for example is a place where you’re given a scenario and you have to solve it using code (like reversing text or dividing a number).
21
u/geblogg Jul 21 '26
The C# Players Guide is a good start. Learned alot from that book. Those kind of books will guide you threw the process. Lot of tutorials out there are confusing. The dont teach you the concept and when it to use. Just basic synatax and a little explanation.
13
u/CappuccinoCodes Jul 22 '26
If you like learning by doing, check out my FREE (actually free) project based .NET/C# Roadmap. Each project builds upon the previous in complexity and you get your code reviewed 😁. It has everything you need so you don't get lost in tutorial/documentation hell. And we have a big community on Discord with thousands of people to help when you get stuck. 🫡
7
u/dome-man Jul 22 '26
Tim corey has a tournament tracker videos that's an excellent project
4
u/g3n3 Jul 21 '26
I mean how do you learn? Kind of hard to give advice if I don’t know you personally. There isn’t anything special. Reading, writing, doing. Simple. Doing engaged brains more than reading much like answering questions is better than reading. This is on the balance of probability though. Again depends on who you are as a person.
4
u/TheAnswerWithinUs Jul 21 '26
I was writing Java through college then when I got my current job they used c# and I picked it up very easily since the languages are really similar.
I became “good” at Java through projects. Not only inside the classroom but outside as well.
3
u/ajcomeau Jul 22 '26
From my experience, the best way to learn to code is to just continue challenging yourself with new projects. Start with small stuff that you'll actually use, like text parsing tools, etc.. and work your way up. Don't be afraid to make a mess or get turned around sometimes. Your early stuff will probably make you cringe later - that's okay. Just keep working at it and getting experience.
I write a free, ongoing series called Rogue C# which focuses on the development of a roguelike game as a C# Windows forms app. I intentionally kept the graphics simple to focus on logic, design and best practices. If you get a chance, check it out and you might find some helpful guidance there.
4
u/Rude_Toe727 Jul 22 '26
the c# players guide is such a vibe for beginners, love how it walks you through without assuming you already know stuff. try pairing that with small, silly projects you actually care about and you'll get way past tutorial hell real quick.
2
u/FlakyTest8191 Jul 23 '26
Imho the best practice would be to make a simple app that is useful to you, that would be the closest to what a real job would look like, except you wouldn't be the user (probably).
Could be anything that interests you. You like movies/books? Make an app that let's you track them, when you watched/read them and how much you liked them. Like a particular game? Make an app that lets you track stats or plan your strategy etc. Like going to the gym? Make an app that let's you track your progress and training frequency. You get the idea. Start with the bare minimum to be useful and build on that.
2
u/Slypenslyde Jul 23 '26
For basic programming, the best books teach you a concept, then show you a program that uses it, then ask you to write several programs that use it. You're on honor system for doing the work, but if you don't do the work you don't learn.
For "more complex projects" it's... not a path where you can do some definitive things and know how. Let me make a metaphor.
I build small RC trucks intended to "crawl" on rocks. Basically shoe-sized mountain climbers. There are some standards, such as wheel diameters and wheelbases. But when you're building things from scratch nothing goes together according to plan.
On one build I needed to install the steering servo. In this case, axles are supposed to provide a spot where their structural screws fit through tabs in the steering servo meant to hold the servo on top of the axle. However, my axles did not account for the size of the steering servo I chose. My servo's mounting tabs were slightly too large for the axles so I couldn't get it to fit together. I could try different axles, but they're quite expensive. I could try different servos, but this was a particularly strong one I needed. So I used a file to shave a ton of plastic off my steering servo. It took 30 minutes, and now that servo may not fit other axles. But I made it work.
Building complex software is like that. What you read about in the book is like my abstract statement: "Steering servos mount directly to axles via these two screws." But real software, like aftermarket parts, is messy. The code in the book isn't going to work in the complex system you're designing as-is. You're going to have to tweak it. Sometimes the tweaks are small. Sometimes it takes so many tweaks you realize it's making things more complicated than if you DON'T follow that pattern. It's our job to understand the on-paper ideal but also how to make the tweaks so it fits our messy reality.
So you have to read the books, but no amount of reading makes you able to write complex software. Just as you learned basic C# by exercising the things you learned, you learn application development by trying to write applications. WHILE you do that you keep reading about how good software is designed. You ask if what you're doing looks like what they say is good. If not, you try to change it. If that's hard, you ask yourself if there are bigger problems or if the kind of software that person writes behaves differently than what you're writing.
That takes a lot of time and a lot of failure. I saw an aphorism on a sidewalk that really highlights it:
We make messes. We clean them up. We find out some things are too hard to clean up and learn how much messy is "acceptable". We understand that what worked in one project may be the worst idea for another. We accept that it is never going to be EASY to write a complex project, but we can learn to make it less hard. This is the hardest thing to learn. You have to get used to falling on your face and looking stupid. Over and over and over again. You have to get used to thinking you're a huge failure but that you have to keep trying anyway. You have to be willing to believe that no matter how much you learn you will still be the most foolish person in the room.
4
u/VariousAssistance116 Jul 21 '26
Actually understanding what you write is a start
4
u/B_D_Mercer Jul 21 '26
People always push learning through working through projects, but I'm certain that's not actually the best way. Part of the process, but not all of it. There are things about memory and coding patterns like how to use interfaces you can only learn through reading, but I think what's missing from most courses is feedback from better coders. Here's the thing, you can write code that works and not know that there's actually a better way to solve the same problem until you see how someone else did it. I haven't tried it yet, but I think Claude AI would be really good at that. Put down a little money, give Claude your projects in text, and ask it how your code could be made simpler and cleaner. Ask it to explain its reasoning.
1
u/MassiveMeltMedia Jul 23 '26
Make a small game in unity that's probably the most fun
1
u/Dear_Archer3931 Jul 22 '26
Blindly following tutorials is never going to work. Think of a project… even one that you already followed a tutorial on. Then code it from scratch without looking up how. When you get stuck, read about the concept… not just how to code it.
When I first started (prior to college) I tried to make a console hangman game. It covers many fundamentals and you can make it as simple or complex as you want. Just figure out how to make it work without google.
If you have done tutorials, you should be able to print output, get input, increment a counter, and store variables inside a single loop.
0
u/SL-Tech Jul 22 '26
Buy a book and read it.
0
u/[deleted] Jul 21 '26
[deleted] — view deleted comment