Delegates in C# - A practical demonstration, including Action and Func

  Рет қаралды 307,759

IAmTimCorey

IAmTimCorey

Күн бұрын

Delegates in C# are really powerful, but most people don't know how to use them effectively, if at all. Today I am going to show you what delegates are, how to use them, why they are useful, and really how to take your code to the next level. Along the way, I will cover the special types of delegates named Func and Action. Now if all these new words seem intimidating, don't worry. This topic is actually really simple at its foundation. Yes, you can do some complex things with delegates, but an actual delegate is absolutely simple.
Source Code: leadmagnets.app/?Resource=Del...
Patreon: / iamtimcorey
Newsletter signup: signup.iamtimcorey.com/
0:00 - Intro
1:28 - Demo application walk-through
7:52 - Explaining and creating a Delegate
18:19 - Func and Action: problems you can solve with delegates
21:37 - Func Delegate: creating and explaining
30:56 - Why to have delegate, if all the work is done elsewhere
34:00 - Action Delegate: creating and explaining
38:07 - Creating anonymous methods: anonymous Delegate
43:08 - Creating anonymous methods: anonymous Func
45:15 - Creating anonymous methods: anonymous Action
49:30 - Using Delegates in other projects: WinForms
58:37 - Using Anonymous Delegates in other projects: WinForms
1:02:15 - Summary

Пікірлер: 746
@russellkemmit73
@russellkemmit73 5 жыл бұрын
No BS, I watched this video 5 days ago and used my knowledge to answer an in person interview question today!! Thanks Corey!
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
Awesome! Good luck on landing the job. Glad I could help.
@_Karlsson
@_Karlsson 5 жыл бұрын
I'm so incredibly grateful that people like Tim exists that takes the time to show how it actually works so I don't have to waste my life at stack overflows 8 year old outdated answers. Thanks!
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
You are welcome.
@kerotan2444
@kerotan2444 4 жыл бұрын
This is for me: Example: 1:50 What is a delegate?: 7:52 Func delegate: 18:19 Question: 30:55 Action delegate: 34:00 In line delegates (on the fly): 38:04 WinForm UI: 49:22 WinForm UI with In line delegates: 58:37 Ignoring Action delegate: 1:00:52 When using delegates?: 1:02:15
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Nice!
@nimphilia
@nimphilia 2 жыл бұрын
nicee
@sparrow5813
@sparrow5813 3 жыл бұрын
I recently switched companies and therefore my Java hat to a C# hat. The quality and information these videos provide is insane. Keep up the good work!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@CasshernSinz1613
@CasshernSinz1613 3 жыл бұрын
Okay, you are officially the first and only good tutorial I have ever seen on delegates. My issue has always been "Why?". Because I understand what delegates do but never understood why I would go through the trouble of setting them up. This shed light on everything! You're the only one to show how delegates can essentially carry the value of a method and make it transferable to different UI's without having to change very much. Thank you so much for putting the time into these videos! I hope I can be a better developer by using this to my advantage because not even people I work with could give me this explanation.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it was helpful!
@roydonk2878
@roydonk2878 3 жыл бұрын
Agreed, that's the problem with 99% of tutorials about this. They always approach it from the purely technical side of things, basically just "it can do this and this and this", which just makes it confusing and annoying. Only when seeing it implemented and applied to an actual problem a developer may face does it actually "click" and become relevant.
@CasshernSinz1613
@CasshernSinz1613 3 жыл бұрын
@@roydonk2878 very true, though, that's the problem with most tutorials about any abstract subject. Oddly enough I originally went to college to be a researcher in physics and that sort of issue happens constantly when learning math. "This is what this equations does. Memorize it. Look, *writes out equation and solves it in minutes* its so easy." I really appreciate videos like this and the people who make them because it has become apparent that teaching (like actual teaching) is a skill not everyone can learn. There are lots of "teachers" in the world and yet so few who are actually able to teach. I'm thankful Tim is someone who can actually teach a subject instead of just reading the definition out load.
@titanicpat1275
@titanicpat1275 2 жыл бұрын
Its the hardest thing about learning new or advanced areas in coding, is that the simplicity of the example environment, obscures the usefulness of the new tool.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
That is where practice helps. Trying out what you are learning can reveal what you missed or what was not taught. Then you know the right questions to ask to go deeper.
@morradev1130
@morradev1130 Жыл бұрын
I cannot thank you enough for the extremely resourceful content you put on KZbin for free. You are a exceptional Teacher and great developer. I almost always recommend your content to my co-workers and try to follow your best practices in my daily work.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@shitpostinglel
@shitpostinglel Жыл бұрын
Wait... you can get hired as a c# dev before knowing delegates?
@Sickerror
@Sickerror Жыл бұрын
@@shitpostinglel Yes you absolutely can, even at the best companies like Microsoft. Talking about entry level positions of course though
@darthvader_
@darthvader_ 10 ай бұрын
Tim, you have completely changed the way I look at Delegates. The tutorial was easy to understand and I can't thank you enough for the kind of example that you picked up. I have went over numerous videos on this topic and I'm relatively new to C# but your presentation skills were so to the point that I was able to bridge the gap pretty easily. Please continue making great tutorials like these! I kept on running from delegates before watching this video
@IAmTimCorey
@IAmTimCorey 10 ай бұрын
I am glad it was helpful.
@rossthemusicandguitarteacher
@rossthemusicandguitarteacher 3 жыл бұрын
Tim Corey is a national treasure. Prove me wrong.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@faizalvasaya2998
@faizalvasaya2998 4 жыл бұрын
- The best explanation of Delegate. - The best part of this video is that the focus is on details and that is where the devil lies. - Keep up the good work Tim Corey. :)
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thank you!
@ehsanshirazi2003
@ehsanshirazi2003 2 жыл бұрын
The last part that winform was connected to the function that uses delegate was the best part. Thank you for your contribution.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Glad it was helpful!
@stbny4444
@stbny4444 Жыл бұрын
Best C# teacher hands down anywhere. Thanks Tim!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@lazarnikolic8161
@lazarnikolic8161 3 жыл бұрын
Comparing delegates and interfaces is one of the best explanations I've come across so far.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it was helpful!
@vartikagupta8816
@vartikagupta8816 3 жыл бұрын
Finally I have started to understand delegates and their usage. Thanks Tim!!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Awesome!
@Defiler151
@Defiler151 Жыл бұрын
Very good explanation, I've programmed in C++ for a long time and when you showed the first example it clicked right away. Didn't even notice before that delegates are the same as function pointers for an example in C++
@IAmTimCorey
@IAmTimCorey Жыл бұрын
I am glad it was so helpful.
@maxlin2905
@maxlin2905 3 жыл бұрын
Hi Tim, just let you know that your lessons are becoming an important part of my life, I spend 2 or 3 hrs on listening to them and I love them. Thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Awesome! I'm glad you are finding them valuable.
@brunomatzinger3637
@brunomatzinger3637 Жыл бұрын
I love the way you explain things. Delegates have been a closed book for me until now. Now I get it.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Excellent!
@Ravroid
@Ravroid 3 жыл бұрын
Thank you so much for all the hard work you put into making this content. Seriously one of the best, if not THE best C# tutorials I've found so far.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@vin2629
@vin2629 Жыл бұрын
This must be the best video on delegates I came across so far.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Great!
@morgadoapi4431
@morgadoapi4431 2 жыл бұрын
You are doing great work, one video at a time. Thanks a lot for your videos!
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 2 жыл бұрын
Thank you for the feedback and ecouragement
@Magau68
@Magau68 Жыл бұрын
Mastered delegates for the first time. Really handy! Helped me to save loads of lines in my unit test. Thanks a lot for a great video.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Awesome! I'm glad this helped.
@gelucreanga
@gelucreanga 4 жыл бұрын
Hi Tim. It's been five years since I started working as a developer, yet I still find your videos instructive. There are things I thought I understood, but actually didn't and some aspects that were always foggy for me and that now are coming to light. Thanks for your work, your ability to explain sth you've understood is outstanding. I know a lot of developers that really know what they're doing, but when it comes to explain it to someone else, they fail miserably. Thanks again Tim.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I appreciate the kind words.
@DHGameStudios
@DHGameStudios Жыл бұрын
Thanks, Tim! Seriously an absolute game changer these here Delegates. I feared I'd have to do some weird two-way event thing to pass a request from the logic layer to the UI layer, and then the eventual user reply back to the logic layer. But this unlocks so many new possibilities for my code.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Awesome!
@jaroslawkrolikowski1293
@jaroslawkrolikowski1293 Жыл бұрын
Hi Tim, Your videos are astonishing. I am (re)developing my skills, as I decided to unstick a label which was attached to my person, and which is kinda barrier in my carrier. But first I must tell you that I am watching your tutorials with pleasure not only because they all full of tips and valuable information but you dose them at a well selected tempo. It is nor too slow neither too fast. It requires good attention but repeating more difficult or condensed fragments doesn't annoy you and there is a very good reason why. It is your calm, energetic, bright and clear voice, the voice of a person who is sure of what he is speaking and how work the things he is speaking about. Programming is my hobby, and I have developed many programs, aside of my everyday job, mainly in Builder C++ but I started with v3.0 and later didn't keep up with progressing technology. When I saw changes implemented in modern C++ standards 14, 17 ... I was a bit "shocked" discovering Pascal within C++ 😂 I was a bit angry and my son told my that my brain processor runs an obsolete operation system which wasn't patched for a very long time. I am plugged into the industrial automation and robotics world (STL, LAD, FBD, SFC, SCL ...) but fortunately I left some IT related ports open so I am able to upgrade my skills. From time to time I used some devices which work on the edge between IT and OT and faced some problem with samples in C#. As long as you do not need to bother much about programming from scratch, and it is enough to adjust and slightly modify provided examples you don't bother much. Currently I develop a bit more sophisticated software which uses Siemens Openness API and I found out that my knowledge must be quickly updated, especially its C# related area. I was searching for some good resources, bought a book 700 pages book, and then found your channel - IMHO the best one. Thank you very much. JK
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome. I'm glad my content has been so helpful. Thanks for sharing.
@ankitkumarroy2236
@ankitkumarroy2236 Жыл бұрын
Thank you so much for the video Tim. Got clearer picture of Delegates, Func, Action and Lamba expression.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Excellent!
@miladabdi3191
@miladabdi3191 Жыл бұрын
Thank you TIm, for these awesome videos. I can learn anything in C# with these videos.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@xFieRZex
@xFieRZex 2 жыл бұрын
I've read about delegates in Shildt's book, then in Troelson's book and finally only after this amazing tutorial I get it. Thank you so much!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@AmandeepSingh-xk4yv
@AmandeepSingh-xk4yv 3 жыл бұрын
Extremely well laid out and comprehensive! Thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@chriswych.2656
@chriswych.2656 3 жыл бұрын
Thank you sooo much! I never really understood delegates untill now. The videos you create are amazing and very helpfull. Keep up the great work!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Happy to hear that!
@JackNotJack
@JackNotJack Жыл бұрын
Another great tutorial. I'm still a little nervous around delegates and anonymous methods, but going through this tutorial helped so much. Thanks Tim.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Glad it helped!
@xianyu6565
@xianyu6565 4 жыл бұрын
Come back to say Thanks!! I used the knowledge gain here in my actual work today! Very excited!!
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Fantastic! I am glad it was helpful.
@ayam_jantan_
@ayam_jantan_ 5 ай бұрын
this video is the ULITIMATE GOAT! thanks Tim, you did it again.
@IAmTimCorey
@IAmTimCorey 5 ай бұрын
I am glad it was helpful.
@thovarisk8699
@thovarisk8699 4 ай бұрын
man this is such a great tutorial!! very complex topic but made simple by Tim, thank you so much.
@IAmTimCorey
@IAmTimCorey 4 ай бұрын
You are welcome.
6 жыл бұрын
Thanks Tim to take your time to explain this, is very useful for who is learning C # and for me, of course! Keep on going!
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
You are welcome.
@luizyoung226
@luizyoung226 Жыл бұрын
Great lesson Tim, thank you.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@jojojawjaw
@jojojawjaw 2 жыл бұрын
Your tutorials are such a great help! I've never seen any other channel on KZbin that explains C# and .NET as good as you do or as helpfu as you do
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Glad you like them!
@vitorpaulinogoncalves936
@vitorpaulinogoncalves936 4 ай бұрын
Man, you make difficult things so understandable! You're awesome!
@IAmTimCorey
@IAmTimCorey 4 ай бұрын
Thanks!
@goodmanshawnhuang
@goodmanshawnhuang 2 жыл бұрын
Great thanks Tim for such a wonderful masterpiece. I immediately applied it to resolve my issue: when a lower level code needs to refer to a higher level's method, I used delegate to make it loose-coupled. feel amazed. thanks Tim, you're just the best. :)
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Awesome!
@12spiedey
@12spiedey 5 жыл бұрын
Great explanation. Not to fast and taking me step by step. Thanks. Used lamba expressions for a while now but its always nice to know what they do
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
I appreciate the kind words.
@maddy3274
@maddy3274 3 жыл бұрын
Thanks Tim. Excellent demonstration. Events and Delegates are no more a grey area to me.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it was helpful!
@keshavjha2566
@keshavjha2566 4 жыл бұрын
Thanks a lot Tim. You are really making learning c# simpler. Thanks.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@delhitepawan5804
@delhitepawan5804 3 жыл бұрын
Excellent Tim...keep the good work going.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thanks!
@arifcanbalta2789
@arifcanbalta2789 3 жыл бұрын
that moment when you've been watching for 40 minutes and he says "in a nutshell" 38:03
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
lol
@MarcinKralka
@MarcinKralka 2 жыл бұрын
You should see the book called "C# 9.0 in a Nutshell" then :) It's > 1000 pages long.
@sheepay99
@sheepay99 2 жыл бұрын
Very helpful, have read about delegates a few times through the years but never fully understood them until now. As a long time anti C#-er, I am finally learning to enjoy it.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Awesome! I am glad it was so helpful.
@pavolbutora
@pavolbutora 3 жыл бұрын
Again, excellent and simply explained. Thank you.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thank you for investing time with Tim's videos.
@vladandreiteodorescu7611
@vladandreiteodorescu7611 3 жыл бұрын
Wonderful and simple. Love your work!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you so much!
@lyndondoliveiro5941
@lyndondoliveiro5941 4 жыл бұрын
Excellent explanation. Just subscribed to your Patreon site
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Awesome, thank you!
@cisip
@cisip 2 жыл бұрын
As always, very helpful and well-structured content. Big thanks!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@HasnainRaza-dp5bw
@HasnainRaza-dp5bw 3 жыл бұрын
Thank you for this tutorial. Like your other content, it is comprehensive with theory and practical examples.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are most welcome. Thanks for watching.
@mtsacchi
@mtsacchi 2 жыл бұрын
Great video, Tim! Already subscribed to you blog. I'll take a deeper look into the courses you sell. Thanks a lot!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are most welcome. Thanks for watching.
@osmartakashi
@osmartakashi 3 жыл бұрын
The best explanation so far. In my real life experience those concepts is very hard to implement because the deadline is very tight and the team has no time to think in better design patterns.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
They are hard, which is why practicing them to get skilled at them is a big deal. The easier they are to do, the more likely you will be to use them in a real project.
@osmartakashi
@osmartakashi 3 жыл бұрын
@@IAmTimCorey Sure, you are right. Tks.
@bubblesgrappling736
@bubblesgrappling736 4 жыл бұрын
once again, tim corey had the best video on the topic
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thank you.
@dcernach
@dcernach 3 жыл бұрын
Perfect! Totally the WOW tutorial about Delegates/Funcs/Actions... Please, make an Expression Tree tutorial following this one... 🙏🏻
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
I will add it to the list. Thanks for the suggestion.
@brightndiweni1657
@brightndiweni1657 6 жыл бұрын
I am enjoying even the comments, great discussions here awesome environment. Cnt wait for the next one!!!!
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
Excellent!
@jayjayjaythebrand
@jayjayjaythebrand 6 жыл бұрын
We've waited for this and the wait was more than worth it. I'm bumping up my Patreon donations
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
i appreciate it.
@Jose67898
@Jose67898 2 жыл бұрын
Very good explanation. The conclusion for me (in this concrete case): 1. GenerateTotal can send "messages" to Main while it process its work. 2. I can write the code for some operation GenerateTotal does. So GenerateTotal is just a plan, what have to do, but the concrete code is mine.
@asyncawake9011
@asyncawake9011 6 жыл бұрын
This was high on my wishlist, can't wait to watch!
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
Great!
@shezadahmed817
@shezadahmed817 3 жыл бұрын
I had to watch it twice to get it. Then was able to implement for a dev for a client. Thanks so much
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent! Way to stick with it.
@jiggzzz
@jiggzzz 3 жыл бұрын
Sir can you please demo me the code with real world example?
@marceloleoncaceres6826
@marceloleoncaceres6826 8 ай бұрын
Thank you for sharing your time and knowledge, you are doing a great job, God bless you!
@IAmTimCorey
@IAmTimCorey 8 ай бұрын
You are welcome.
@raphaelpinel2614
@raphaelpinel2614 4 жыл бұрын
Thank you! Great tutorial. Clear explanations :-)
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@shayak9048
@shayak9048 4 жыл бұрын
That's an excellent way of teaching. It's much easier to understand like this instead of reading the concept in book. :)
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
I am glad you are finding it enjoyable.
@harag9
@harag9 6 жыл бұрын
Great video, nice and clear! Looking forward to the Async video / threading video.
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
Thanks!
@frankcastle5007
@frankcastle5007 3 жыл бұрын
Helped me a lot to understand delegates and their use, thanks a lot man your videos really clarify a lot of the concepts i find confusing about C#.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Great to hear!
@Phantom-pj1ls
@Phantom-pj1ls 3 жыл бұрын
You're a wonderful teacher m8! It's a subject way beyond of what we're currently learning in college but I wanted to give a try beforehand and WOW!!!! Up until Func/Actions I totally got it all then I kinda got lost but I know the 'clicking' moment is not far!!! Thank you!
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad it was helpful.
@cod4Rlp
@cod4Rlp 4 жыл бұрын
man you are wholesome, asking is people are financially able
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thank you. My primary purpose is to help people. I definitely don't want people spending more than they should out of a feeling of obligation.
@emokatusha
@emokatusha 4 жыл бұрын
Good videos. I am learning English watching you videos. Thanks.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Thanks!
@perceptron4958
@perceptron4958 4 жыл бұрын
Значит я такой не один. =) Тим выдает чистую амброзию для ушей.
@brunokucevic4288
@brunokucevic4288 6 жыл бұрын
Hell yes!! Cant wait to watch it later today. Hope it has func and action covered
6 жыл бұрын
yup, he covers that topics too
@brunokucevic4288
@brunokucevic4288 6 жыл бұрын
Excellent. As long as he sticks to his elaboration techniques i will be more than satisfied.
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
Let me know what you thought of it.
@brunokucevic4288
@brunokucevic4288 6 жыл бұрын
Its awesome. Still a bit of abstract but awesome. Ill watch it till i understand it.
@brunokucevic4288
@brunokucevic4288 6 жыл бұрын
Next up dictionaries? Right? Hehehe.
@deepakkelath4772
@deepakkelath4772 3 жыл бұрын
Very good explanation this really helped me to make my application more flexible.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent!
@Old.Man.Of.The.Mountain
@Old.Man.Of.The.Mountain 4 жыл бұрын
This reminds me of the AddressOf operator in VB6, which I implemented a few times. It also reminds me of how we used to declare and raise events in VB6. Good memories.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Yeah, delegates are really close to events (events are a type of delegate).
@framepointer
@framepointer 2 жыл бұрын
For those with some experience in C, you can think of C# delegates as C function pointer typedefs that are memory-safe and have more functionality (for example, invoking the method dynamically).
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thanks for sharing.
@alfullard8887
@alfullard8887 2 жыл бұрын
Very helpful and comprehensive. Thanks
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@pete9049
@pete9049 4 жыл бұрын
I remember your video about the concept of interface so much that I could relate it with delegates.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Great!
@fahadaslamtanoli
@fahadaslamtanoli 2 жыл бұрын
very good tutorial love way of teaching why we need and when we should use
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thank you!
@jakubczechowski1159
@jakubczechowski1159 2 жыл бұрын
Thank you for this very tutorial and other tutorials!! They give me a lot of insight into c#
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 2 жыл бұрын
Thanks for trusting and building your skills with Tim
@ShyamSundar055
@ShyamSundar055 3 жыл бұрын
Its really "in a nutshell" about delegates. Great stuff 👍
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you enjoyed it
@TheNorthRemember
@TheNorthRemember Жыл бұрын
i had the OHH YEAH moment when you create the subtotalalert method, thanks for this vid
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Glad it helped!
@DaveLudwig
@DaveLudwig 4 жыл бұрын
The value of delegates (and the realization of how much we already use them) really came to the forefront for me when I developed a WinForms app that had a modal progress bar. The progress bar has a BackgroundWorker, however the methods for DoWork and ProgressChanged are passed in, and actually live on the main form. The main form was doing the work and populating the progress bar with progress values and text updates. I then continued to use that custom Progress Bar form in other applications.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
Cool.
@RyazantsevNikolay
@RyazantsevNikolay 4 жыл бұрын
Hmm, why not to supply your Progress Bar with just values and text updates, not delegates, it would be even more flexible.
@ddishuman
@ddishuman 5 жыл бұрын
thanks so much, Tim. Majestic!
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
You are welcome.
@jaynardrazon9994
@jaynardrazon9994 4 жыл бұрын
thanks Master Tim! God Bless!
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are very welcome
@guitarsk8r11
@guitarsk8r11 3 жыл бұрын
Was fuzzy on some of the details, this cleared everything up. Thanks.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Excellent!
@gilhooli6685
@gilhooli6685 5 жыл бұрын
Hi Tim. I hope you feel better soon. I miss your lessons and wish you a good health.
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
I'm finally getting better. New videos are coming soon.
@raghuZanne
@raghuZanne 4 жыл бұрын
Thank U very much! Awesome example and explanation.
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@sanwalchaudhry2099
@sanwalchaudhry2099 5 жыл бұрын
awesome explanation... I will recommend this video to every beginner programmer.
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
I am glad you enjoyed it.
@tonyynot484
@tonyynot484 3 жыл бұрын
Subscribed. Very well explained.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Thank you!
@nathansmalley8433
@nathansmalley8433 2 жыл бұрын
Figured out it is just a function pointer within the first 10 minutes. Thanks.
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
@tommyj0059
@tommyj0059 3 жыл бұрын
Simply brilliant courses.
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Glad you think so!
@jansmrcka
@jansmrcka 6 жыл бұрын
Well done. You explanation is clear like a diamont :-)
@IAmTimCorey
@IAmTimCorey 6 жыл бұрын
Thanks!
@misterdecaro
@misterdecaro 5 жыл бұрын
This has been so helpful! Thank you!
@IAmTimCorey
@IAmTimCorey 5 жыл бұрын
You are welcome.
@stuartmurton7319
@stuartmurton7319 4 жыл бұрын
Good vid, clear and easy to understand, thank you
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome.
@SergeiFedorov77
@SergeiFedorov77 2 жыл бұрын
This is great stuff, I wish I would've seen this a few years earlier but better late then never!!
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
Thank you!
@pablocaiza.
@pablocaiza. 3 жыл бұрын
thank you for all your hard work on this
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
You are welcome.
@cristiannass3945
@cristiannass3945 3 жыл бұрын
Thank you, Corey
@IAmTimCorey
@IAmTimCorey 3 жыл бұрын
Welcome!
@RedBirdOBX
@RedBirdOBX 3 жыл бұрын
Thank you for this video. Took 2 viewings before it sunk in...but persistence pays off.
@tomthelestaff-iamtimcorey7597
@tomthelestaff-iamtimcorey7597 3 жыл бұрын
Thanks for hanging there. Rarely can we pick up all of it in one pass, because there is just too much great info.
@gotitgoodgetit
@gotitgoodgetit Жыл бұрын
Awesome Demo, Thanks
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@furiousmatthew2287
@furiousmatthew2287 Жыл бұрын
you're a genius men, seriously! :) I subscribe instantly
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Thank you!
@tymofiisemeniuk1418
@tymofiisemeniuk1418 4 жыл бұрын
Thank you for your knowledge. Absolutely not simple....
@IAmTimCorey
@IAmTimCorey 4 жыл бұрын
You are welcome!
@Konslufius
@Konslufius Жыл бұрын
I recently picked up on Delegates because I was looking for a solid foundation for an event system for my text adventure game. It works pretty well so far. Some better file management and I could reuse it for future games.
@IAmTimCorey
@IAmTimCorey Жыл бұрын
Great!
@Mustafamutasim
@Mustafamutasim Ай бұрын
Thanks! You are the best 🌹
@IAmTimCorey
@IAmTimCorey Ай бұрын
Thank you!
@kellybmackenzie
@kellybmackenzie Жыл бұрын
Your channel is awesome, this helped me so much!! Thank you so much!!
@IAmTimCorey
@IAmTimCorey Жыл бұрын
You are welcome.
@martin6778
@martin6778 2 жыл бұрын
It's very Great Explanation.. wonderful, Thx a lot sir
@IAmTimCorey
@IAmTimCorey 2 жыл бұрын
You are welcome.
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 185 МЛН
How many pencils can hold me up?
00:40
A4
Рет қаралды 16 МЛН
格斗裁判暴力执法!#fighting #shorts
00:15
武林之巅
Рет қаралды 70 МЛН
C# Delegates Делегаты
18:14
codaza
Рет қаралды 80 М.
C# Delegates & Lambdas Explained
32:43
Raw Coding
Рет қаралды 36 М.
C# Events & Delegates
17:21
Tarodev
Рет қаралды 81 М.
C# Dependency Injection with Autofac
54:45
IAmTimCorey
Рет қаралды 291 М.
What are Delegates? (C# Basics, Lambda, Action, Func)
18:39
Code Monkey
Рет қаралды 279 М.
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 185 МЛН