Need help learning C#
Corrected by IA, because i am not a fluent english speaker :
I started learning C# using this collection: https://learn.microsoft.com/en-us/collections/yz26f8y64n7k07. However, after finishing the second part, I moved to this page: https://learn.microsoft.com/en-us/training/dotnet/ (scroll down a bit) to get a better understanding of .NET.
When I reached this lesson: https://learn.microsoft.com/en-us/training/modules/dotnet-files/2-file-system, I realized that I didn’t have the necessary knowledge, particularly when I encountered IEnumerable<string>.
I looked at the documentation and learned what an interface is, but then I realized that understanding interfaces also requires knowledge of classes (which I haven’t learned yet). I went back to the C# collection I was following and found nothing about classes or interfaces.
So now, I’m a bit lost. The first module of the .NET learning path expects knowledge that isn’t covered, even later in the C# collection. I really want to learn C#, but the learning path that Microsoft provides doesn’t even cover classes?
13 Replies
The learning path itself I would say is not a perfect substitute for a class like structure. If you click on things like "interface" and go to https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface it should help you understand what an interface is. The same for class/record/struct.
If you have specific questions about any of them this is a good place to post. I would say the "working with file system" section doesn't necessarily mean you need to understand what an interface is. Instead, you can follow along and use them without fully understanding. Sometimes knowledge like that comes easier with usage than an absolute definiton.
interface keyword - C# reference
Use the
interface
keyword to define contracts that any implementing type must support. Interfaces provide the means to create common behavior among a set of unrelated types.interfaces are not a unique concept to C# either, so if you find resources that help understand object oriented programming concepts you can apply that to C#
Thanks, I’ll do my best to continue learning and refer to the documentation when needed. I wish there was a collection with more advanced lessons so I could learn along the way instead of having to search through the documentation.
I'm not super familiar with the training courses, but I believe some of it is covered in https://learn.microsoft.com/en-us/training/modules/csharp-call-methods/3-call-methods where it outlines creating an instance of a type and calling methods. If you have feedback to improve learning there's a "Feedback" at the bottom that I would suggest you use 🙂 . Unfortunately it doesn't look like these are open source like most of ms docs are
Exercise - Call the methods of a .NET Class - Training
Exercise - Call the methods of a .NET Class
and if you have specific questions you can always ask here
Oh yes, I completed this module, but the concept of interfaces really threw me off in my learning path. ( i think i get it now )
I have a question for you: Where did you learn C#? Was it just through documentation?
Thanks for the help!
Where did you learn C#? Was it just through documentation?I learned C# after being in industry after about 5 years. So picking up core concepts was a bit easier for me. The core concepts I learned on my own eons ago + I have a CS degree. all I can say is the first fully cool project I ever made was chess in java using notepad as my text editor 😅. Would not recommend
Okay, thanks :)
Keep at it, and don't hesitate to ask questions. People in this discord are here to help. Good luck!
I think this channel should offer some generic advice for theses questions, since I see there's plenty of them.
@LemonDwarfG59 I really doubt that reading documentation is a good source for first time learners. It's not structured and made that way. Use it when you need a reference for a specific thing in the language.
There's an amazing book from which you can learn C# and fundamental programming concepts - "The C# Players Guide".
The book is entirely written for people new to programming. And it's written pretty well, also there are exercises for each chapter, so you can have something to solve and practice what you've learned:)
Oh yes, I thought about getting a C# book because it's often really appreciated by people. However, I don't get why books still exist when we can take online courses. Anyway, thanks for the recommendation! If you have any other books to suggest, I'm open to it!
Well often books tend to go more in depth and the good ones are written by reputable. knowledgeable authors, therefore offering higher chance of quality content. Whereas courses come along with a lower chance of being as good. (Not to mention video tutorials which I believe are a waste of time)
I really doubt that reading documentation is a good source for first time learnersThe resource itself was a learning/training track. Those should be a good starting point (although agree that a book is probably a more complete way)