6: How To Create Classes And Objects In C# | C# Tutorial For Beginners | C Sharp Tutorial
HTML-код
- Опубликовано: 12 сен 2024
- In this C# tutorial you will learn to create classes and objects in C#. We use classes as blueprints in order to create many different objects based on these blueprints, and since objects are used all the time you will need to learn about objects.
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon to share improved and updated lesson material, and for a small fee you can access all the material. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Material for this lesson: / lesson-material-42361704
I want to thank you very much. Today i got hired as a junior web developer and that's because I watched your PHP tutorials (that's more popular in my area). You made me follow my dreams, you're the best!
How's the job going man?
@Matt Dobing @Cheesecake S sorry, for some reason youtube did not notify me about any like/reply. The job is still going great. Not working with php anymore but with SAP in the same company. The pay differs from country to country and region to region so I don't think that would help anyone.
@@alexnecula Great to hear that! Keep it up!
You are the best , i didn't like programming and never understood the concept of classes until i watched this thanks .
same, his videos really helped me understand the instantiation.
I love your way of explanation. You are my kind of teacher who explains basic and doesn't assume that others will pick up the complex concepts easily.
When I first listened to you, I thought you must be Danish (Your English accent). Now, I have checked your About which confirms that you are indeed Danish.
Thusind tak for fantastiske videoer
Love your approach of teaching. everybody else sounds like Greek. You on the other hand make things simple! Thanks and look forward to your other vids.
Mmmmm, I wish I may be allowed to tap thumbs up a MILLION TIMES...!
After watching numerous C# RUclips videos, this individual adeptly explains a complex subject, making it understandable for everyone. He is a gifted instructor.
I can honestly say I got more from this video than I have gotten from a semester and a half of school so far!!!! Thank you so much for the clear explanations. I am pretty sure I am going to be watching all of your C# and Unity video.
You are simply the best, I can’t believe I couldn’t get this in high school but 8 minutes into your video it made perfect sense. Keep it up; also you are incredibly under rated
Thanks so much for this. So many other videos assume you will understand some random small details but if you don't, you get lost. You explain all of the little details perfectly which has been great for me as a beginner. Thank you!
I forget so much stuff, but you made me remember everything in the video and understand more. I am 14 and you may have just caused me to have a future, im trying to learn to code for thefuture and just as a hobby. You have helped me so much sir, Thank you
Wow, you are 14 years old and you understand all this. You have a bright future, I can tell you that for sure
Great video, simple, effective and covers almost everything that I wanted to be cleared. Thank you
I have used soo many of your video's to learn programming and it has helped me enormously, But I never really left any comment on how much I appreciate your video's. You explain things very clearly and it has helped me progress a lot. Keep doing what you're doing mate. Thanks a lot!
I really love that you explain every little piece of the code as you go. Most teachers will just write out a massive chunk of code and then just talk about the concepts when I have no idea what the hell im looking at.
Great explanation. Syntax is something that's fairly easy to grasp, but OOP has always been something I've struggled with, concept-wise. Other tutorials I've watched and books I've read will start to explain it, then before you know it they've gone off the deep end with more advanced topics. This tutorial is more like the gentle on-ramp people need, something that gets you grounded in the basics before getting into the heavier topics relating classes.
this is the best explanation of classes and how to use them theat i have seen until now and i have seen quite a lot .
I found your channel 3 days ago and I am a fan. Thank you so much when you explain like nobody else with covering security like in your mysqli tuts and other details. Your tuts both good for beginners and pros. You are the best man. Put the donate button! I will donate you 5 bucks for your time. Love that you are covering C# too :-) Thank you, thank you, thank you!
you really know how to teach Beginners , so easy to understand
you don't confuse the person which tries to learn
as always HQ stuff sir
This is the video. Finally. Thank you for clearing this up! Usually I find vids that explain things okay but add too many other concepts in their examples without explaining what they are or why they're being used (and frankly, it would be too much if they did, so it'd be better if they just kept to the bare basics like this). Good job, brother!
As a Masters student in comp sci with only a background in teaching, I have been really struggling learning how to take my application and implementing the program code. Thank you so much for your explanations!
Thank you. First 2min I knew this is EXACTLY what I needed to remember about C# classes to start mentally thinking about my program. AMAZING!!
I just wanted to say you are an amazing person and I owe a lot of my knowledge to you, thank you Daniel
This course is so popular Visual Studio already now the entire code before you even finish the video ! Thank you !
Dani this example really gave me much clarity on classes and objects, didn't really grasp it until now :') I wanna pursue a career in system dev so i'm definitely watching more of your vids! Thank you
I wish I had this when I was learning c#, you're great man, keep it up great work!
Thank you so much for this amazing video that has just clarified Classes, Properties, Fields and Methods. Thank you most especially for the diagram at the beginning of the video, seeing a visual representation of what a class is and what it is allowed to contain is Genius!
Thank you! Thank you!! Thank you!!!
Every concept I have learned so far has been explained best by yourself. Thank you for the great content. :)
Thank you very much I just started learning C# in school and I didn't understand classes and you explained ,so thanks.
Classes, instantiation and objects were my nightmares, thanks to you for breaking these three apart.
Best instructor and incredibly clear with description and definitions. Thank you!!
I am a novice in this world of programming; I look around for way of understanding what is thought at the university, that is how I stumbled into your channel, and you know what? I am having fun with your videos; they make me feel like Hey! I can learn this stuff.
i love how you learn classes before if statements it just seems so backwards and i love it
Hey! One of the questions I had during this episode was why you chose to use Pascal case inside the class structure instead of camel case. But I put it together on my own, realizing that every other object used Pascal case and, since it was inside that must be the normal naming convention.
On another note, I was wondering why you chose to concatenate the Console.WriteLine string instead of using string interpolation, which I find much less tedious to write. Ex: $"Hello, my name is {Name}, I am {Age} years old}";
Thank you very much Dani, your explaination very carefully, I knew more about what I had learned in school, Hope you make more videos... From VietNam with love
@Dani Krossing don't meant to demoralize you. You are great. I Was hoping you will do it in two separate class files to create class and object but you didn't.Also I watched you all the way up to end. You are great
This is the best explanation about the concept of OOP. Thanks mate
This is a brilliant video and explanation of classes and methods (and field vs property). Thanks a lot! :-)
I finally understand classes!!! Thank you so much!
Thank you! This is the best C# stuff I've found. Many thanks!
thank you so much for making the video, these complex concepts really make sense to me now!
This is probably the most important lesson in c# programming
Absolutely Loved the way you explained each and every details!!!
Very straightforward explanation, straightforward to understand as a beginner, very appreciated
Thank you Dani! Very well explained lesson!
Thank you very much, your explanation are really amazing, I subbed, liked, and clicked the bell, glad to have found wonderful teacher.
A Literal life saver! Thank you so much!
Thank you..this OOP is a little bit tricky for me
The best video for explaining classes i have watched so far ! Thanks 😊
Thank you, man! This video helped me a lot!
thank you , very informative!!!
So what can i search for to see more advanced ways about classes and objects to get some ideas?
I wish to see this video earlier. Thank you so much for sharing a bunch of information in this video. 🙏
You are the best instructor!
I am so happy that you started this series. You are an amazing teacher and it gives me confidence now that I can learn C# in best way possible. Thanks so much for your help.
This series was started 8 years ago by TheNewBoston who put lots of hard work and dedication into making them. These are just re-uploads from someone trying to steal credit. It even announces TheNewBoston in the beginning of the video.
You're the best. Clear explanation. Thanks and keep it up!
Thanks, this is what i was looking for
Great video, want to learn C# to program in unify bc the only code i now atm is python and pygame isnt that great for making larger games. Thought the transition would be hard but u explain everything verry well, thx.
Great video for beginners. Explained the concept and terminology of classes so well.
This guy taught or explain much more better than paid courses and even better than my OOP C# teacher....
Man I just subscribe because of this. I just started taking this Udemy course and whenever I need a deep dive into a specific topic I will definitely go back to your channel for that.
I am from Brazil and I love your way of explanation.
Thank you a lot for the video. 👏🏻
you are stunning man .Thank you for your help.
You explained it very well, thank you so much
Just learnt bunds of things from this single presentation. Thank you very much.
I find your tutorial excellent. Thank you for sharing your knowledge.
wonderful video i was really struggling with the concept of classes
First time watching your tutorial...I subscribed right away, that's how good you are!
Thanks, this helped alot with OOP.
You are best bro. I have subscribed just watching a single video. :))
this is the perfect video to know about class and objects in c# :) :) :) :) :)
You make it sooooooo easy to understand 👏👏👏👏👏
Perfect knowledge transfer! Bravo
Thanks a ton for this video, it cleared a lot for me! Thanks again!
I was under the impression that fields were variables that you could assign a value to later on. So when you capitalized:
public string Name;
public int Age;
public bool HasPet;
it was very confusing that you didn't make them lowercase. (variables use camelCase) After doing some research I saw that 'fields' use the Pascal capitalization convention. But why? What is a 'field' exactly. I am having trouble figuring out the difference between fields and variables. All the definitions online are pretty confusing. (at least for a beginner).
Would I be making a big mistake by filling out the Person class like this?
public string name = "John";
public int age = 28;
public bool hasPet = true;
Are there properties of fields that I would be missing out on if I used variables instead?
you are better than my instructor
big thump
Thank you for making this simple and intersting
Your video helped me.
Thank you.
the best teacher. i am subscribing for sure.
Thank you! 😊
Thank you it was useful and with details.
Excellent explanation ! Exactly what I was looking for 😊
Hi Dani, I love the way you explain things so I wanted to look at your course on Patreon. When I went there I didnt really see if what I would gain access to would be something I would need. How do I see what you have available? Great vids man!
My Patreon currently have copies of most of my lesson material, so people can compare their code with mine, in case they can’t get theirs working. 🙂 As well as the option of downloading my videos.
Atm there is nothing “extra” on Patreon, since I want everything to be available through my videos here on RUclips. 🙂
I love your explanations.
Thank you. Liked and subbed!
Your Tutorials are great , officially addicted to your channel , at 03:00 , there is a missing letter "C" in in the word "Access Modifiers" ))))
Thank you so much this really helped me understand the concepts!❤️
thanks a lot you made it very simple
Awesome video. Thank you.
Thank you for teaching me c# Elon :)
THANK YOU MR.BEAST !!
Thanks so much I finally learned OOP!
Very interesting. Thanks a lot
I think i might have learned some things in a different order, but wouldnt it be easier to create a new method in your main class called
public static void Greetings(string name, int age, bool pet)?
Its probably because its an easy example but i just want to make sure why you would choose making a class over a simple method
Thanks :)), great tutorial btw
Thank you a lot for the video. Finally I understood this topic.
very good, thank you!
omg a tremendous help!!!!
Great video… well done
I am lucky to be here. Thanks Man
What a nice voice for teaching coding!
You are a talented teacher, thanks
thanks for this, i think its going to help me a lot but i was wondering why you wrote the string like this:
"Hi! My name is " + Name + " and my age is " + Age;
and not like this:
$"Hi! My name is { Name} and my age is {age}";
would like to know if there is a reason to choose one over the other
I'm still learning, so correct me if I'm wrong, but I'm pretty sure they are the same thing. Your way is the newer way to do it and involves less typing but maybe he didn't want to explain that way of doing it yet so as not to confuse people?
Can you teach about how to store data permanently using JavaScript?
Thank you! LOVE IT.
Thanks man 🙌