I love BRACKEYS... better than professional education.. Thank you so much!!!
@Brackeys9 жыл бұрын
Thanks man! I'm glad I can help :)
@noblepredator92642 жыл бұрын
A real life example from games makes your videos far more interesting and comprehensible than other videos out there on C#.
@paktofu1237 жыл бұрын
I like how you go through it one more time near the end unlike most tutorials that try and speed through it all. Thanks
@arcanaliberta757 жыл бұрын
Maybe now i'm just starter, but once i get success in my life i promise i'll never forget you. And i promise i'll support you as i can. Thank you very much for making such a helpful video.
Been programming in my spare time and this is the first time using getters and setters has made sense in a scenario. Thank you for the vid. :)
@Brackeys9 жыл бұрын
Angelo Encarnacion You are welcome! :D
@mostsoul58185 жыл бұрын
Bh
@rocketduck444 жыл бұрын
I know I'm a few years late, but you're a real lifesaver man! I got a OOP test tomorrow, and your videos are so much better than our course material.
@mrdankinator47824 жыл бұрын
epic
@federicobruno23785 жыл бұрын
I studied a lot of programming languages at university, such as, C, python, php, android, html, xml javascript and Java, i think C# it's really similar to Java and i'm learning it very fast. I just want to thank you for this free lessons, you are a very good teacher. You got new sub!
@h0g_275 жыл бұрын
This video is fantastic. I could not wrap my head around getters and setters, and after watching this video I finally understand it. Thank you so much.
@Jurdelol7 жыл бұрын
Jesus christ dude, you're the first person to actually tell me what GET and SET actually frigging does! I need this in-depth information in order to understand it myself. Thank you!!
@psalt218 жыл бұрын
After watching multiple KZbin videos on this topic this is the absolute best video I've seen by FAR. Using the DateTime.Now example really helped me since I already had a certain amount of context going into this video. I am definitely subscribing to your channel! Thank you for stepping through the code again at the end - it really helped reinforce everything.
@CM-ng1ef9 жыл бұрын
As always this was absolutely fantastic. I know you get this a lot but i think i speak for a lot of people when i say PLEASE bring back the challenges at the end. Anyway, fantastic job!
@websurfer52837 жыл бұрын
After trying to understand this from a book and a few other youtube videos I clicked on. This video has made it clear for me what getters and setters are all about. I understand them now. Thanks Brackeys.
@wasabifunyuns7 жыл бұрын
Really, this by far the best explanation of using getters and setters that I've found. Even Msoft's documentation confuses the hell out of me. Mostly watching your videos to review C# since it's been almost half a year since I've done anything with it, but this video stands out to me among the rest. Phenomenal work with coming up with a very basic, yet amazingly explained way to show the use of get/set. I salute you, good sir.
@chrisogle0015 жыл бұрын
I’ve been confused on Getters and Setters for 2 days. Your explanation is fantastic, thank you for making this video.
@Uz9866 жыл бұрын
i dont normally comment but have to say you explain things really well you are not just explaining syntax or logic but even telling us how and when it is useful for us to use things. would love to see more videos of C# and unity from you.. great work
@cubemaster67076 жыл бұрын
This is the best explanation of getters and setters I have ever seen. I finally understand! Thanks a lot!
@aminakbari737 жыл бұрын
the best way to teach a language , with realistic examples instead of math examples. thanks dude
@rodneyjenman86164 жыл бұрын
until now i was unclear that get/set limitation is genuinely something i should bother with. you have managed to actually clarify to me why it is genuinely useful: your example that you need to make "set" conditions to stop problems such as colleagues "shortcutting" illegal values into your fields. Which may come from a place of inventiveness rather than clumsiness!
@northernpanda69535 жыл бұрын
Det var godt å få en forfriskning på dette. Utrolig hvor fort en glemmer slike ting.
@rodneyjenman86164 жыл бұрын
extremely clear, easy to watch, no bullshit, useful.
@dolphinextreme488 жыл бұрын
I didn't find the previous videos in the series as hard to understand, given my high school knowledge in programming, but this one I had to watch twice and actually write the code out, getting the errors, and now I kind of understand the concept, very well explained :D
@owencoopersfx4 жыл бұрын
Dude, thank you so much. I understand so much more about programming now just from going through these videos in the last week. Your explanations are clear and simple to understand and you give some great examples and exercises.
@speedyzolt6 жыл бұрын
Thank you soooooo much! I really understand getters and setters. Very useful. You are so great at explaining in detail each line of code.
@sippinoolongtea9 жыл бұрын
I love how he explains things so everyone can understand it. Thanks bro :D
@joaomanta82996 жыл бұрын
You teached me in 18 min what my college teacher couldn´t teach i 6 months i think its safe to say he cant teach thank you so much
@bioblade872 жыл бұрын
the first 5 mins of the health example was like a light bulb moment for me! thanks!
@sryndapled45655 жыл бұрын
Why do you need to pay money for c# courses when you can find such a perfect tutorials and course in KZbin thank you Brackeys!
@mickcapsouto22704 жыл бұрын
I love the way you explain things, very thorough. Great job.
@mrdankinator47824 жыл бұрын
yaaaa
@Altaranalt8 жыл бұрын
I'm loving this series. Still struggling a little bit now and then, but the vids are solid.
@andrew30683 жыл бұрын
clear and excellent explanation, 6 years later.
@jackytank4 жыл бұрын
Honestly! I first come from Microsoft C# Doc and when I learn til the part Property, I have no idea until I got your video cover in, very easy to understand, ....
@mferreira12314 жыл бұрын
I'm migrating from Java and this are some important details ! Great video, 100% understandable and well explained! Cheers
@lukassrovnal93123 жыл бұрын
Thank a lot Brackey!! You're the best teacher
@Daymanoahha2 жыл бұрын
Wow thank you. Been struggling with understanding this subject until now 🐻🐻🐻
@TheMitsosS6 жыл бұрын
Finally!!!!!! Someone to explain it simply!
@darrinhert92969 жыл бұрын
Excellent tut as usual!
@Brackeys9 жыл бұрын
Darrin Hert Thank you :)
@marvinchaves12525 жыл бұрын
I been watching like dozens of videos explaining this without getting it..... and the only one who could make me get it was the one who explained in gamer terms XD... Simply genious XD
@BobrLovr4 жыл бұрын
use unity tuts then
@braker375 жыл бұрын
To me, the most crucial moment of this tutorial was at 06:30. I am new to C# and programming in general. The only language I am comfortable with right now is JavaScript, and after learning it, C# is a pain in the ass. I can't wait to become as comfortable in C# as I am in JS.
@mercuryc66699 жыл бұрын
I love this series. It's been super helpful for me. Thanks!
@diliupg3 жыл бұрын
Merry Christmas Brackeys! Your tutorials still going strong after 5 years. :)
@Alexander_Meyer4 жыл бұрын
Straight to the point and clear, thank you for the tutorial
@eeronat4 жыл бұрын
Exceptional teaching skill. Subscribed before the end of my first video.
@minh56937 жыл бұрын
Thank you so much, i really love all of your videos
@CraigHinrichs9 жыл бұрын
+Razvan Tanase It's just like Java in concept except they encapsulate the set and get inside brackets of the field allowing you to use unary operators on the field and get piped to the set and get brackets. These advantages are encapsulation, readability and comprehension than anything else that I know of.
@catleysama9 жыл бұрын
Awesome to re-watch these!
@omarnazih85297 жыл бұрын
I didn't get that from professors and i get it from you you are amazing man
@Eric-pg4ej4 жыл бұрын
thank u i searched a lot for it and didn t understand but i understood you ^^
@oggurk20978 жыл бұрын
best teacher ever
@deimon4517 жыл бұрын
Finally! Now i get getters and setters! Don't know why, but, with your explication, it clicked instantly. There's an issue, though, that almost threw away that. Using += and -= proved really confusing to me in this context, because the variable it's actually being get and set "at the same time" here: tom.health += 50; ==> tom.health = tom.health + 50;
@salmankavishgmail8 жыл бұрын
Thanks a lot, i was very confused about properties. Very helpful video...
@xxmehmetali14 жыл бұрын
Super duper excellently explained 👍🏼
@vaibhavborole3736 жыл бұрын
It really helps alot to understand the concept
@marcusmorrow39005 жыл бұрын
Excellent explaination. I was creating a game where i used a tutorial that involved using this on a healt bar and didint know why until now. Thanks.
@AHKCHANNEL7 жыл бұрын
plz consider making full programing tutorials ur videos are amazing the quality is unmatched by any other Channel on KZbin
@Karlponken8 жыл бұрын
Very good explanation using the health and player references, thanks alot!
@mrdankinator47824 жыл бұрын
yis
@Dippps5 жыл бұрын
Thanks for free lessons! I wish you good luck.
@streetfighte6 Жыл бұрын
i am 7 years late, I found this still useful
@OddStare6 жыл бұрын
Seriously thank you for existing
@wasp57sr5 жыл бұрын
Thank you so much for all your videos, very helpful! (Better than most I've watched.)
@alvaromp11064 жыл бұрын
Cristal clear, thanks!
@conorhorgan1839 жыл бұрын
The tutorials you make are great! i will definitely think of donating
@TheFlyguy317 жыл бұрын
This tutorial is brilliant.
@LetsTalkBM7 жыл бұрын
Thank you, now i understood it, the idea why is well told by you.
@VillagerLifeCraft6 жыл бұрын
Very useful and clearly explained . Thankyou Brackeys
@vaibhavborole3736 жыл бұрын
Thank u sir u r explaining mind-blowing
@lohitpeesapati44236 жыл бұрын
Thank you! That made a lot of sense now.
@viktorlernt60634 жыл бұрын
Thanks for great explanation!
@Galluxi9 жыл бұрын
I needed this tutorial! Thank you really much :)
@Damjan257 жыл бұрын
awesome tutorial! :)
@forerunners29665 жыл бұрын
i bought some courses on udemy......but youre explaining it so nicely that i have to donate money to you.
@ChickenSkit6 жыл бұрын
15:32 did you ment to say "how ever" but failed and said "how eweeee" xD
@raymk4 жыл бұрын
ehehehehehehe
@patricktuftestrand12469 жыл бұрын
Fantastic tutorials
@HingalshDealer3 жыл бұрын
nice Tutorial Brackeys,thanks
@Crisikos7 жыл бұрын
great video again, perfectly clear and usefull. thanks a lot
@BeatingStandards7 жыл бұрын
Awesome, thanks for the easy tutorial.
@arfast-xolotl7 жыл бұрын
Incredible tutorials man, thank you very much for all of this
@razt37579 жыл бұрын
This might sound stupid but...why does these get and set properties exist? I mean you could just call/set that with a public int getHealth function (or setHealth) which will return _health, right?This is what other languages call "Encapsulation", that's what we are doing in this video, right? like this: private int health; public int getHealth(){ return this.health; } public void setHealth(int health){ this.health= health; } I'm coming from Java programming and this looks really odd to me.Is there some other purpose for these properties, like do they access the memory in a diverse way (perhaps it's faster for the cpu)?
@marijapizdarija77817 жыл бұрын
Did you ever find out the answer? I'm wondering about the same thing at the moment. :D
@razt37577 жыл бұрын
Marija Pizdarija I'm not sure, I haven't been exploring this but to me it looks just like syntax sugar, probably the compiler does the job in your stead. Just like C used to introduce objects in its syntax, but they were just that: "syntax", objects didn't exist at a low level of compiling (ofc that's a different story today), the syntax helped you to write them. I think the same happens here, the compiler manages these properties in background for you and actually treats them as methods.
@prototypeinheritance5156 жыл бұрын
It removes the boilerplate code of the setters and getters. Faster to write
@michaelkennielsen14226 жыл бұрын
I am watching these videos as a supplement to my education and i'm basicly doing what you are saying. My teacher told me there are like 4-5 different ways of doing it but this is one of the easier ones to understand when you are starting out
@jvsnyc6 жыл бұрын
The answer is that you aren't just saving boilerplate, but you are no longer guessing at what the names will be, also, yes, syntactic sugar, but it is one less thing to remember, or perhaps two fewer things. There is exactly one place that does verification of setting of the private instance variable, even from the rest of the class methods, you know exactly how to call it and don't need to remember what name you called it. Sure, you can do it "by convention" but there are as many conventions as there are teams...
@philippeleduc94647 жыл бұрын
Excellent tutorial! Subscribed.
@louis-etiennemessier76236 жыл бұрын
Really awesome video !!
@skillshotbulgaria73538 жыл бұрын
Pretty good tutorials! Helped me alot! You are awesome!
@adigunademola83606 жыл бұрын
Thank you very much for this!
@MichelVilarino9 жыл бұрын
Great Video Brackey, looking forward to see the rest of the series, is there any chance you will release video more often?? would love to get to the needy-greedy parts of C# and get to the advanced topics of the C# language. And once again thanks.
@LanceGHall7 жыл бұрын
You earned my subscription
@_noizmusic7 жыл бұрын
Such amazing tutorials, man! Wish I found these earlier haha.
@maxhatfull39498 жыл бұрын
Do you have any videos explaining static methods/classes? Your videos make it all so much clearer
@eldanx8 жыл бұрын
The getters and setters are definitely interesting when compared with Java or C++ where they are just conventional methods.
@bhupatirajusriramvarma89235 жыл бұрын
I kind of confused with when to use the parentheses , can you please clarify it for me?
@TheJaniable7 жыл бұрын
Hi! Where should I continue? Do you have a series that continues this one? I want to make games, beginning with Snake :)
@roei9229 жыл бұрын
Thank you very much!
@hiderr68054 жыл бұрын
Just big THANK YOU!
@sumrandumGI9 жыл бұрын
great video! I'm ready for the next :D
@madhavgupta7402 жыл бұрын
Great Explanation!!! I've one question: Can we define "property" without associating it with any "field"? I mean inside getter or setter, can we write any logic without using any "field"?
@doozku4508 жыл бұрын
Deserves more likes.
@Danyu915 жыл бұрын
does _health specifically have to equal "value"? or can you use another word in substitute to "value""? and is there anything other than return that you can use in the get property?
@TheVictor1198 жыл бұрын
YOU'RE THE BESTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
@trieuqtran6 жыл бұрын
Amazing tutorial!!!
@flawlessflowerSky6 жыл бұрын
I hope u make a video on the stack stuff , linked list and so on , I need them soo much ....
@Lhoang19999 жыл бұрын
In this example, the Player class is inside the MainClass class. I am a beginner and normally see two separate classes in other examples. Does it make a diff. if the Player class is inside or outside?
@leluong87436 жыл бұрын
It doesn't make any difference as long as it inside the namespace.
@GBartz213 жыл бұрын
"This might look a bit confusing to you" Actually it's the first time it makes a bit sense..
@The-cyber-imbiber5 жыл бұрын
Brackeys are you shitting me? I hardly ever see anybody more clearly teach topics as complicated as this (save for the Khan Academy videos). Cheers.