Resources for Learning C#/Monogame

Hello, I am fairly new to the programming world and wanted to ask those who are programming here what would be some good resources for me to purchase (either physical or digital) that can help get me off the ground as far as programming goes, whether that’s in C#, or more specifically, with Monogame. Most of what I find online are several years old and a lot of it doesn’t apply anymore, so if there are any book resources, video resources, or something else that helped you along when learning this, it would be greatly appreciated.

When I say I’m new to this, I mean brand new. I’ve followed along with a few tutorials and wrote my first application (a text based RPG) completely in .NET Core. It was fun to do and it helped me get some of the very basic beginner concepts, but finding resources that help grow and establish a good foundation that are not just tutorials that build one specific project are very hard to come by. Even more so for anything that is about C#8, or Monogame 3.8. I’m not even sure if I should just learn C# on its own first, or if it makes sense to try and use Monogame’s framework from the start.

Really anything that can get me started in the right direction would be very beneficial. Any and all responses would be greatly appreciated. Thank you!

I have used w3Schools to learn new languages.
I have been programming a long time which makes it easier for me to pick up new languages, but I think it might suit someone starting out too.
The c# tutorials are here:

It is an Object Oriented language which in short means everything in your program is an object.
I recommend you take a look at the basic concepts of OO also.

This looks useful (quickly skip past the patronizing 6 year old comments at the top :upside_down_face: ) ttps://www.freecodecamp.org/news/object-oriented-programming-concepts-21bb035f7260/

Happy coding!

You really don’t need to purchase any courses unless you really want to. There are tons of free resources out there that will help you.

Some advice.

  1. Language is not relevant to learning programming. Once you learn one, the others will become easier.

  2. Develop standards for yourself. Meaning, you name things the same way, you perform tasks in specific and consistent ways (Kids these days call this “Patterns”). There are plenty of documents out there that outline standards. Find the things that work for you.

For example, a few of the standards I have are:

a) Constants are UPPER_CASE and have under scores between the words.
b) Class fields are prefixed with m_ in front of them
c) local variables are camelCase
d) I always initialize variables
etc…

If you’re consistent with your coding and they follow your standards then it makes it a lot easier to track down bugs and to make changes.

  1. Always be willing to throw something out and start again.

  2. The best way for ME to learn is to find something I want to do then try to do it. If you learn that way, then pick something and complete it. If you have a different preference to learning (say following tutorials) then do that.

That (use standards) is a great tip to point out to someone starting out.

Microsoft provided a standard for naming things in C# which is a bit different to yours (which reminds me of the C++ standard).

For the OP this becomes very important when someone else looks at your code. You might think now this will never happen, but it will :slight_smile:

In a professional environment code is reviewed for quality and the standard is used for this. The reviewer will point out places where you have not followed the standard.

I found a handy quick reference for the Microsoft standard here:

This will also help when you are trying to figure out someones else’s code.

One other thing, https://stackoverflow.com/ is a fantastic website for helping you if you are stuck. Whatever problem you encounter, it’s probably already been solved there.

1 Like

Thank you all for the tips/advice. I’m definitely looking for a way to learn while maintaining best practices, so the naming conventions (and in turn, capitalization) is really helpful. I’ve got that Naming Conventions page bookmarked now. I have never heard of Stack Overflow, but looking forward to digging in.

While I appreciate it, what I’m hoping to find is something that says “When you program ‘jumping’, you’d use something like this. Here’s why we did it this way.” The things I find are mostly older, to be sure, but even some of the newer stuff that covers 3.8, for example, are just “you wanna make a game? follow this!” You can learn some stuff that way, but I like to know the logic behind why.

I don’t know any other languages and C# is where I’ve decided to start, coupled with Monogame. Because of that, aside from some very light learning I’ve done on my own in the past, I am coming into this very blind, so the theory is just as important as the instruction. I see a lot of people do things a lot of different ways, and I know preference plays a part in that, but why is it their preference? Is it easier? Does it function better? Does it run better? Is it easier to read/debug? All of these questions are what get me stuck on certain issues.

That’s the challenging part about asking folks for help. They’re quick to say “no just do this” as opposed to the actual teaching/logic that goes behind it. And I get it, all of our time is valuable and we are doing our own things, and the more time we spend helping others, the less time we spend on our own stuff, so that’s why I’m looking for resources that will help me build a strong foundation for coding in the future.

Hello PT6
I think you need to broaden your approach, you won’t just be learning C#! Once you’ve got your head round the basics you find the principles are largely the same for a lot of the big languages. A loop is still a loop in all the languages it’s just the grammar that is different. When you make a game you want to store info and you could write the data on each line in a text file. More common though is XML, JSON, YAML or something like that and they’re all data storage languages (although I use that in the loosest sense of the term). Once you’ve got a basic grasp of how nodes go together in xml and the core components of C# you’ll find you 2/3 of the way there to writing web pages.

Go have a poke at Javascript. Try to pick out the core components that are applicable across both languages and you start to see why they did it that way. Visual Basic is a good one to look at too. It’s C#'s sister basically and a lot of the answers to your C# questions are written in VB!

Also, learn your way around GitHub and how to download a project. It’s where a lot of projects get posted.