Teacher lectured about getters and setters for 2 hours and after class I didn't have a clue what they were. This 12 mins video explained them well and now I understand them. Thanks.
this is basically 3years of math courses for me. Uni teachers explain subject in 2h and nobody got any of that(mostly because it's just theory and not actual practice) then you go home and an awesome guy like this explains the subject to you in 10 min. youtube, udemy, and wikipedia are our generation's true teachers
Michael K don’t put all lecturers under that category. My math and comp sci lecturers are both excellent, they focus on both theory and intuition at the same time, they make sure we have the intuition to understand what it going on.
You're not too dumb, even people with high IQs and whatnot struggle to grasp this. And almost all professors suck at teaching these concepts -- that doesn't really help either.
Omg I thought it’s only me today very reluctantly I gathered my courage and ask my tutor to explain this concept to me didn’t really get my head round it however this dude has made everything crystal clear 😂
I literally spent 4 years trying to learn getters and setters and didn't have a clue what they were. This short video explained them perfectly and now I understand them. Thank you!
Periodically over the past 6 years, I've watched all the LinkedIn courses and many nights trying to wrap my head around this concept "ended up more confused than when I started." Your teaching method gave me a complete understanding, and I can finally finish my program.
Three things discouraged me from proceeding with learning oop 15 years ago - constructors, get(), set(). The more I read on these the more confused they became. Even many other videos on youtube leaves you more confused. You simplied everything within few minutes. The feeling is just on another level. You are a great teacher.
Thank you so much for taking some of your time to share what you've learned over the years in a very compact and relatively easy to understand manner. Big love from Canada !
OMG! I name all my method parameters with the prefix of "a" or "arg" -- I took a lot of crap from that over the years. You're the only other person I've seen that does this! I feel... validated.
That just sounds like an improvement to the existing naming convention, especially to distinguish what is what to newbies at a glance. Microsoft only says "When writing method parameters, use camel casing." So keep doing what you're doing
I'm about to finish all these videos from the freeCodeCamp compilation. The best free tutorials out there! I just hope there's more for C# moving to the intermediate something like that and then advance.
Good job brother, I can’t believe how easy to follow and understand ur content is, i have searched for vid after vid none of em very clear and u killing it man Absolutely superb bro!
So, I watched all the way through your whole C# series, and thought I had a grasp on what you were teaching. Only to go try and write my own program and have no idea where to begin. Once I realized I needed to understand the overall way of thinking like a programmer, I began to be able to apply what you taught. Now, coming back to your videos for reference, I'm finding that uou are the best teacher I've seen yet. Keep it up!
For anybody reading the comment above who are looking for the 'foundation' (eg. thinking like a programmer); look for the free CS50 course (by Harvard University Lecturer - David J Malan) on UA-cam. This will help you very nicely! Good luck and Godspeed to all my fellow potential programmers out there!
Thank you for the refrence. I don't know how to think like a programmer yet. My instic is to solve problems by seeing which syntax fits the problem but that is a very bad habbit@@shallanrambaran6942
@shafialanower3820 For me it really was just a lot of practicing. Unfortunately ChatGPT wasn't a thing I had access to when I was trying to figure it all out; but honestly that's gonna be your best bet for any questions, and helping to explain things you feel like you're struggling to understand
Thank you, I have been learning c# through solo learn and their explanations have been getting very unhelpful this helped me understand properties far better
Awesome tutorial bro! I would only make one suggestion and that is to use a Switch statement rather than an "If" when you have more than 3 conditions to test, as it gets hard to read when you have one long list of "ORs""
I just need to go to all of your videos and give a thumbs up. You make things so incredibly easy to understand that I'm dumbfounded at how hard some others make things! You do an incredible job and I REALLY appreciate your videos!
You are helping me in my class. I just cannot understand what the teacher is talking about. I feel stupid...you make me feel like there is some hope i will pass this class!!
Using getters and setters to include rules for managing attributes make sense to me. Untill today, i just tought "if an attribute is private, why the heck other classes would have access to them via getters and setters?". I can be wrong, but i think that i have seen already a O.O. clean code guide which says that you can't use them because it wouldn't make much sense, but this seems fine to me.
The only thing i really dont understand is get set statements that just return something. Then you can just return the property without get set. The whole point of get set as i understand is to control the property with if statements.
What if we but the if statement inside the movie class without using the set method title=aTitle; director=aDirector; If (aRating == “PG” || aRating==“R” || aRating==“NR”) {rating = aRating} Else {rating=“NR” }
This is why Programming classes in colleges and university are equally hated. They explained a concept for 2 hours and no one can understand it but a programmer on youtube can do it for under 15 minutes
can it be said that setters and getters are roughly the same (since both are methods that are being called from/to the object) with the only difference of the keywords used (speaking about setters and getters)?
Dude i love your stuff but for some reason i got a stock over flow when i followed your video i don't know if its just me or if others have experienced this to. Still though you do help out a lot in my school work
If the user has access to the program.cs and modify a value using a setter, doesn't he also have access to the Movie.cs and change it there from private to public?
I'm just beginning C#, but would I be wrong if I put the allowed rating options in an array and then check if the attempted rating was in that array...?
so if i want to access one of the variables i declared private the syntax would be: shrek.rating="NR"; or Console.WriteLine( "The following movie" + shrek.title + "was rated" + shrek.rating"); correct? There must be a way to generate those movienames... Thanks for the great video! Really made my day
Teacher lectured about getters and setters for 2 hours and after class I didn't have a clue what they were. This 12 mins video explained them well and now I understand them. Thanks.
this is basically 3years of math courses for me. Uni teachers explain subject in 2h and nobody got any of that(mostly because it's just theory and not actual practice) then you go home and an awesome guy like this explains the subject to you in 10 min. youtube, udemy, and wikipedia are our generation's true teachers
Michael K don’t put all lecturers under that category. My math and comp sci lecturers are both excellent, they focus on both theory and intuition at the same time, they make sure we have the intuition to understand what it going on.
this... so much this.
@@navjotsingh2251 hes not talking bout your...... Teachers
You guys have discussions?
Dude, seriously. I am in an online class and have been close to tears because I thought I was too dumb to understand OOP. You are a life-saver!
You're not too dumb, even people with high IQs and whatnot struggle to grasp this. And almost all professors suck at teaching these concepts -- that doesn't really help either.
Omg I thought it’s only me today very reluctantly I gathered my courage and ask my tutor to explain this concept to me didn’t really get my head round it however this dude has made everything crystal clear 😂
hey man you very clear and concise. Great job
I cant get over how fluid my man is with the knowledge. Thank you Mike!
You are so good at this, I wish you made more of c#
Bro you are a born teacher...Your explanations created my IT career💖💖💖💖💖
Four years later, still the best way to understand the concept of getters and setters.
I literally spent 4 years trying to learn getters and setters and didn't have a clue what they were. This short video explained them perfectly and now I understand them. Thank you!
Periodically over the past 6 years, I've watched all the LinkedIn courses and many nights trying to wrap my head around this concept "ended up more confused than when I started." Your teaching method gave me a complete understanding, and I can finally finish my program.
Thank you Mike,
You've made this topic really easy to understand.
Not only you're a great programmer, but your teaching skills are also quite impressive. Very informative thank you.
Three things discouraged me from proceeding with learning oop 15 years ago - constructors, get(), set(). The more I read on these the more confused they became. Even many other videos on youtube leaves you more confused. You simplied everything within few minutes. The feeling is just on another level. You are a great teacher.
This is the greatest getter and setter explanation I’ve ever seen
Thank you so much for taking some of your time to share what you've learned over the years in a very compact and relatively easy to understand manner. Big love from Canada !
I have watched several videos and I did not understand it until now. Thank you
OMG! I name all my method parameters with the prefix of "a" or "arg" -- I took a lot of crap from that over the years. You're the only other person I've seen that does this! I feel... validated.
That just sounds like an improvement to the existing naming convention, especially to distinguish what is what to newbies at a glance. Microsoft only says "When writing method parameters, use camel casing." So keep doing what you're doing
I do this too, I just find it less confusing tbh
I'm about to finish all these videos from the freeCodeCamp compilation. The best free tutorials out there! I just hope there's more for C# moving to the intermediate something like that and then advance.
Thanks, you're a lifesaver. I've been stuck with this for days now. Also, it's Andrew Adamson.
From all the programmers I saw on UA-cam. Mike is for sure the best.
Def not
Good job brother, I can’t believe how easy to follow and understand ur content is, i have searched for vid after vid none of em very clear and u killing it man
Absolutely superb bro!
So, I watched all the way through your whole C# series, and thought I had a grasp on what you were teaching. Only to go try and write my own program and have no idea where to begin. Once I realized I needed to understand the overall way of thinking like a programmer, I began to be able to apply what you taught.
Now, coming back to your videos for reference, I'm finding that uou are the best teacher I've seen yet.
Keep it up!
For anybody reading the comment above who are looking for the 'foundation' (eg. thinking like a programmer); look for the free CS50 course (by Harvard University Lecturer - David J Malan) on UA-cam. This will help you very nicely! Good luck and Godspeed to all my fellow potential programmers out there!
How did you leaarn to think like a programmer? Is it more practice problems?
Thank you for the refrence. I don't know how to think like a programmer yet. My instic is to solve problems by seeing which syntax fits the problem but that is a very bad habbit@@shallanrambaran6942
@shafialanower3820 For me it really was just a lot of practicing. Unfortunately ChatGPT wasn't a thing I had access to when I was trying to figure it all out; but honestly that's gonna be your best bet for any questions, and helping to explain things you feel like you're struggling to understand
Thank you, I have been learning c# through solo learn and their explanations have been getting very unhelpful this helped me understand properties far better
This saved my life! Thank you! This video is fantastic and describes perfectly what I needed to understand to get my assignment done tonight.
I don’t know why I wasn’t able to grasp getters and setters before this, but this really helped me. Thank you
You are a life- saver bro ! Struggled for hours and got the logic within 12 minutes ! keep it up
I love how simple and clear your explanations are ! Thank you!!
Thanks. Was having trouble creating multiple setters and getters in one class and this helped my organization!
very good explain and examples, one of the best i've found in entire internet that i can understand.
Mike makes it so easy to understand, thank you so much.
I would like to see a Dog rated movie 😂
it means dog sheet rated movies 🤣🤣🤣
This guy is a legend. clear and concise content without beating about the bush #amazing
The best movie on YT on Get and Set in C#!!!! You are legend! Explained me what teacher could not ;)
Awesome tutorial bro! I would only make one suggestion and that is to use a Switch statement rather than an "If" when you have more than 3 conditions to test, as it gets hard to read when you have one long list of "ORs""
The best explanation I’ve heard yet! I heard/watched a couple in my native language but don’t get a clue what these guys talking about. Thanks!
I just need to go to all of your videos and give a thumbs up. You make things so incredibly easy to understand that I'm dumbfounded at how hard some others make things! You do an incredible job and I REALLY appreciate your videos!
Thanks a lot man for simplifying this. I was almost on the verge of dropping out from the course at school. You're a lifesaver!!
Thanks a lot, read it in a few places but didn't grasp it till I saw this
Fantastic. I somewhat understood what getters and setters were, I just didn't know why you needed them, the motive. Now I see... thanks!
8:26 if value is equal to POG
PS thank you this helped me
You are helping me in my class. I just cannot understand what the teacher is talking about. I feel stupid...you make me feel like there is some hope i will pass this class!!
I'm new to C# and this lesson made sense.Well explained sir.Thanks
a very good teacher and the best video of getter and setter
Well explained, I finally know what's the deal with get/set ... Thanks!
awesome Mike!! You are the best. 😀😀
Thanks for this great introduction!
I am still new to c-sharp and I am use to create getters and setters differently from java :)
7:15 Damn dude, why your program always yelling at you?
the program's a mean bitch, that's why
Really good. I like it very much. Clear explanation.
Fantastic guide, had some trouble understanding this, but could follow your explanation perfectly on the first attempt!
Thank you! You made me understand those.
Have a nice day!
@Mike Dane thanks for the awesome explanation. Can you please create tutorial on lambda expressions in C#? Thanks
Everything you do is for free, so I donate 10 euros via your site. Please keep up the good work :)
I have learn a lot lesson from you, Thanks!
this explained it better than 3 weeks of programming class
This the gem. Thank you man!
I'm always thankful for your content! Thank you, Mike Dane!
I'm watching your video from turkey.You are very good
Love your content...very easy to understand, and interesting.
Thanks a lot
best c# tutorial i have ever seen
Thank you very much. I have been watching a few times and I did some sketches and took note. I think that is super clear. Thanks a lot
Using getters and setters to include rules for managing attributes make sense to me. Untill today, i just tought "if an attribute is private, why the heck other classes would have access to them via getters and setters?". I can be wrong, but i think that i have seen already a O.O. clean code guide which says that you can't use them because it wouldn't make much sense, but this seems fine to me.
I like that it rhymes
At last I've understand the main reason of using getters and setters. Thanks will not be enough for you... But thank you a lot.
super helpful! Thanks!
you're really talented at explaining :D
This man is a national treasure
Simple and comprehensive
The only thing i really dont understand is get set statements that just return something. Then you can just return the property without get set. The whole point of get set as i understand is to control the property with if statements.
Best Teacher ❤️❤️❤️
BEST EXPLAINER!
Awesome
Clear and concise
What if we but the if statement inside the movie class without using the set method
title=aTitle;
director=aDirector;
If (aRating == “PG” || aRating==“R” || aRating==“NR”)
{rating = aRating}
Else
{rating=“NR” }
Thanks, a very clear explanation
Great! I understand "set" and "get" thanks to this video
This is why Programming classes in colleges and university are equally hated. They explained a concept for 2 hours and no one can understand it but a programmer on youtube can do it for under 15 minutes
Thankyou so much to clear the concepts😇
Fantastic explanation dude, you are extremely good at what you do. Thank you.
அருமை, வாழ்த்துகள்;
Your tutorials are awesome. Thank you!
can it be said that setters and getters are roughly the same (since both are methods that are being called from/to the object) with the only difference of the keywords used (speaking about setters and getters)?
Dude i love your stuff but for some reason i got a stock over flow when i followed your video i don't know if its just me or if others have experienced this to. Still though you do help out a lot in my school work
Nice ty! Would love to see a full course on OOP from you!
This helped a lot, thanks so much!
bro this video is so cool... thanks for explaining it so clearly
Great Job . Thank You. Keep on your work. May God Be With You.
You are my savior ❤❤❤
YOU DESERVE MY SUB! THANK YOU!
If the user has access to the program.cs and modify a value using a setter, doesn't he also have access to the Movie.cs and change it there from private to public?
Good flow and a better explanation.
so the "value" need not be defined anywhere? what data type does "value" accept?
It explained getters and setters nicely, but the example would have called for an enum.
I'm just beginning C#, but would I be wrong if I put the allowed rating options in an array and then check if the attempted rating was in that array...?
it really helps me on my assignment!! thanks!
Very clear. Thank you sir :)
Very helpfull video thanks!
Could you please give one example on boolean property... It's gonna be very helpful for me 😊
Can you plz explain.. Why you change rating to Rating at 10:27 ? Other parts I understand well.. And Great fan...
I understood this the other day thanks to this video. I took a break and now don't understand it at all. lmao
so if i want to access one of the variables i declared private the syntax would be:
shrek.rating="NR";
or
Console.WriteLine( "The following movie" + shrek.title + "was rated" + shrek.rating");
correct?
There must be a way to generate those movienames...
Thanks for the great video!
Really made my day
Thank you Mike you've made a nice video thanks again.
Wouldn't it be better in this case to create a new enum and use that for your rating variable?
What if we use the exact same thing in the constructor (if statement logic ) then whats the need of get set (except that clean the code).?
Wow! Great stuff.