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!
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.
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.
@@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.
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
Thank you man a lot , i was searching through the internet and still did not understand anything clearly what delegates are , but your video made me understand clearly what they are, and how to use them!😍😍
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
I cannot thank you enough for the extremely resourceful content you put on TH-cam 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.
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
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!
- 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. :)
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++
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.
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.
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.
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.
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.
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.
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.
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. :)
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.
I am amazed how much power there is in C# and Visual Studio, but because I don't know about these concepts I am not getting the full benefit from them. Thank you very much for demonstrating these concepts.
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!
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.
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.
Just want to let you know that if you go to around 50 minutes in the video, you seem to repeat a section where you present the startup code, like if you notice that you already had a private static void already written. I think you forgot to edit it out! Just want to let you know, because looking at the quality of your videos, it shows that you put a lot of time in it and that I put the time to watch it very carefully! Great... Great content, thanks for sharing!
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).
Hi Tim ! I had a question about the Func delegate. Func implies a method that would take in string as its parameter and return a Task. in the same way Func would refer to a method which returns a task but takes in no parameter. But this same Func is used to refer a delegate of type - Func ("AppFunc" - Katana) . This question comes from the Use method on the IAppBuilder which accepts Func and we supply the next middleware in pipeline as Func. The Katana and middleware part is a bit out of place here but I am having trouble understanding how Func can be substituted for Func
i'm just at 17:22, and i totally GET delegates and how useful it is for call back. Good stuff! :) 46:12 - awesome-ness delegate and anonymous methods in full glory
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
Thank you. I personally think MOST Delegates videos online go too far into the weeds which makes it harder for people to understand. There has to be a simple way to explain without using a bunch of other concepts together which can cause confusion. Maybe I'm not smart enough to grasp it. I will come back to this video after finding one easier for me. Thanks for all the great content.
I just realized that there was an editing mistake. The video has near-duplicate sections at 49:58 and at 50:23. Threw me off there for a second. The first duplicate already includes the method "PrintOutDiscountAlert". The second duplicate the "PrintOutDuplicateAlert" is added.
This tutorial is better than the one on pluralsight for sure. However, it's still a little confusing having three different types of delegates passed into a single function, especially as a tutorial. I also noticed a few times you mentioned this isn't how we would actually want to do it, which is usually not something you should be showing people who have absolutely no idea what delegates are. I like to learn best practices, and while this isn't a tutorial on best practices, I want to see delegates used in cases where it makes sense to use them, where they are one of the best solutions for a particular problem. I really would have liked to see some cleanup, instead of using 3 delegates, clean it up and just use 1.
He still encompassed the power of delegates and their use if you watch to the end. He mentioned "this isn't how you'd be using delegates" as a preface to saying he was over using them to show the different types. Stop relying on him and use your programmer mind. How would you condense it into 1? Its easy, all those delegates can actually be made into one single function and delegate. You can do the whole calculation, and message alerts, using one method, and pass that single method to a delegate that returns what you need. He just extrapolated it into the different types for educative purposes. It doesn't mean it isn't the proper way to use delegates. This is still the proper way. If you watched the WinUI section of the video, you will see how convenient those delegates ended up being. You can run code in classes completely unrelated and have it compile and work.
I recomend to move the CalculateMethod to the Library project rather than implementing it in Console and WinForm projects. But thanks for the class. It is awesome I learned a lot
Hi Tim. Well, after months since the first time I watched this, I came back to watch it again. There are points in your course that could be easily missed unless someone came across with in real world. I'm getting used to the delegates (Func and Action actually) when starting separating some codes into libraries. You mentioned the interface at the beginning of this video. I think both interface and delegate are sort of concepts which a programmer need change his/her mindset. I don’t know; however, I believe their application in a code is a big step getting away from classic programming style, otherwise something always whispers in the ears what is the point of using them when things can be done without them. (a false statement of course :) )? Thank you again.
No BS, I watched this video 5 days ago and used my knowledge to answer an in person interview question today!! Thanks Corey!
Awesome! Good luck on landing the job. Glad I could help.
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!
Thank you!
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.
Glad it was helpful!
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.
@@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.
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
Nice!
nicee
Thank you man a lot , i was searching through the internet and still did not understand anything clearly what delegates are , but your video made me understand clearly what they are, and how to use them!😍😍
Awesome! I am glad it was helpful.
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
I am glad it was helpful.
I cannot thank you enough for the extremely resourceful content you put on TH-cam 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.
You are welcome.
Wait... you can get hired as a c# dev before knowing delegates?
@@Lanthiren Yes you absolutely can, even at the best companies like Microsoft. Talking about entry level positions of course though
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
You are welcome. I'm glad my content has been so helpful. Thanks for sharing.
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!
Awesome! I'm glad you are finding them valuable.
- 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. :)
Thank you!
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++
I am glad it was so helpful.
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.
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.
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.
You are welcome.
Comparing delegates and interfaces is one of the best explanations I've come across so far.
Glad it was helpful!
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.
I appreciate the kind words.
I love the way you explain things. Delegates have been a closed book for me until now. Now I get it.
Excellent!
Best C# teacher hands down anywhere. Thanks Tim!
You are welcome.
Tim Corey is a national treasure. Prove me wrong.
Thanks!
This must be the best video on delegates I came across so far.
Great!
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.
Awesome!
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!
You are welcome.
The last part that winform was connected to the function that uses delegate was the best part. Thank you for your contribution.
Glad it was helpful!
Finally I have started to understand delegates and their usage. Thanks Tim!!
Awesome!
this video is the ULITIMATE GOAT! thanks Tim, you did it again.
I am glad it was helpful.
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.
Awesome! I'm glad this helped.
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.
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.
@@IAmTimCorey Sure, you are right. Tks.
Thanks! You are the best 🌹
Thank you!
Another great tutorial. I'm still a little nervous around delegates and anonymous methods, but going through this tutorial helped so much. Thanks Tim.
Glad it helped!
I don't understand how u are able to reply to every comment but I appreciate your effort, and ur vids are amazing!
I've been falling behind and not getting to every one, but I do my best.
Thank you TIm, for these awesome videos. I can learn anything in C# with these videos.
You are welcome.
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.
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!
Happy to hear that!
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. :)
Awesome!
You are doing great work, one video at a time. Thanks a lot for your videos!
Thank you for the feedback and ecouragement
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!
You are welcome.
Your tutorials are such a great help! I've never seen any other channel on TH-cam that explains C# and .NET as good as you do or as helpfu as you do
Glad you like them!
man you are wholesome, asking is people are financially able
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.
man this is such a great tutorial!! very complex topic but made simple by Tim, thank you so much.
You are welcome.
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.
Awesome! I am glad it was so helpful.
Come back to say Thanks!! I used the knowledge gain here in my actual work today! Very excited!!
Fantastic! I am glad it was helpful.
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
I appreciate the kind words.
I had to watch it twice to get it. Then was able to implement for a dev for a client. Thanks so much
Excellent! Way to stick with it.
Sir can you please demo me the code with real world example?
Hell yes!! Cant wait to watch it later today. Hope it has func and action covered
yup, he covers that topics too
Excellent. As long as he sticks to his elaboration techniques i will be more than satisfied.
Let me know what you thought of it.
Its awesome. Still a bit of abstract but awesome. Ill watch it till i understand it.
Next up dictionaries? Right? Hehehe.
Thanks Tim. Excellent demonstration. Events and Delegates are no more a grey area to me.
Glad it was helpful!
We've waited for this and the wait was more than worth it. I'm bumping up my Patreon donations
i appreciate it.
I am amazed how much power there is in C# and Visual Studio, but because I don't know about these concepts I am not getting the full benefit from them. Thank you very much for demonstrating these concepts.
You are welcome.
Perfect! Totally the WOW tutorial about Delegates/Funcs/Actions... Please, make an Expression Tree tutorial following this one... 🙏🏻
I will add it to the list. Thanks for the suggestion.
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!
Glad it was helpful.
Thank you so much for the video Tim.
Got clearer picture of Delegates, Func, Action and Lamba expression.
Excellent!
once again, tim corey had the best video on the topic
Thank you.
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#.
Great to hear!
That's an excellent way of teaching. It's much easier to understand like this instead of reading the concept in book. :)
I am glad you are finding it enjoyable.
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.
Cool.
Hmm, why not to supply your Progress Bar with just values and text updates, not delegates, it would be even more flexible.
This was high on my wishlist, can't wait to watch!
Great!
Hi Tim. I hope you feel better soon. I miss your lessons and wish you a good health.
I'm finally getting better. New videos are coming soon.
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.
Great!
i had the OHH YEAH moment when you create the subtotalalert method, thanks for this vid
Glad it helped!
Man, you make difficult things so understandable! You're awesome!
Thanks!
Just want to let you know that if you go to around 50 minutes in the video, you seem to repeat a section where you present the startup code, like if you notice that you already had a private static void already written. I think you forgot to edit it out!
Just want to let you know, because looking at the quality of your videos, it shows that you put a lot of time in it and that I put the time to watch it very carefully!
Great... Great content, thanks for sharing!
That could be and I just missed it when doing my edits. Glad you enjoyed it anyway.
Excellent Tim...keep the good work going.
Thanks!
Thank you for this tutorial. Like your other content, it is comprehensive with theory and practical examples.
You are most welcome. Thanks for watching.
I am enjoying even the comments, great discussions here awesome environment. Cnt wait for the next one!!!!
Excellent!
Danke!
Great work.
Thank you!
This is great stuff, I wish I would've seen this a few years earlier but better late then never!!
Thank you!
awesome explanation... I will recommend this video to every beginner programmer.
I am glad you enjoyed it.
As always, very helpful and well-structured content. Big thanks!
You are welcome.
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).
Thanks for sharing.
Good videos. I am learning English watching you videos. Thanks.
Thanks!
Значит я такой не один. =) Тим выдает чистую амброзию для ушей.
Hi Tim !
I had a question about the Func delegate. Func implies a method that would take in string as its parameter and return a Task. in the same way Func would refer to a method which returns a task but takes in no parameter. But this same Func is used to refer a delegate of type - Func ("AppFunc" - Katana) .
This question comes from the Use method on the IAppBuilder which accepts Func and we supply the next middleware in pipeline as Func.
The Katana and middleware part is a bit out of place here but I am having trouble understanding how Func can be substituted for Func
Sorry, I'm not really following here.
Great video, Tim!
Already subscribed to you blog. I'll take a deeper look into the courses you sell.
Thanks a lot!
You are most welcome. Thanks for watching.
i'm just at 17:22, and i totally GET delegates and how useful it is for call back. Good stuff! :)
46:12 - awesome-ness delegate and anonymous methods in full glory
I'm glad it was helpful.
Its really "in a nutshell" about delegates. Great stuff 👍
Glad you enjoyed it
that moment when you've been watching for 40 minutes and he says "in a nutshell" 38:03
lol
You should see the book called "C# 9.0 in a Nutshell" then :) It's > 1000 pages long.
Very good explanation this really helped me to make my application more flexible.
Excellent!
you're a genius men, seriously! :) I subscribe instantly
Thank you!
Thanks a lot Tim. You are really making learning c# simpler. Thanks.
You are welcome.
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
Thanks! I added it to the description.
@@IAmTimCorey You sure did. Typo and all! lol
Through*
@@DoorThief Thanks. English is not my natural language. I try spellcheck everything thou. I slipped up. Sorry.
Excellent explanation. Just subscribed to your Patreon site
Awesome, thank you!
Extremely well laid out and comprehensive! Thank you!
You are welcome.
Thank you for this very tutorial and other tutorials!! They give me a lot of insight into c#
Thanks for trusting and building your skills with Tim
Thank you. I personally think MOST Delegates videos online go too far into the weeds which makes it harder for people to understand. There has to be a simple way to explain without using a bunch of other concepts together which can cause confusion. Maybe I'm not smart enough to grasp it. I will come back to this video after finding one easier for me. Thanks for all the great content.
You are welcome. I hope it clicks soon.
I just realized that there was an editing mistake.
The video has near-duplicate sections at 49:58 and at 50:23. Threw me off there for a second.
The first duplicate already includes the method "PrintOutDiscountAlert".
The second duplicate the "PrintOutDuplicateAlert" is added.
Holy fk if i had u as my teacher in school i would have called Bill Gates my employee by now. Keep up the good work.
Thanks!
Again, excellent and simply explained. Thank you.
Thank you for investing time with Tim's videos.
Thank you for this video. Took 2 viewings before it sunk in...but persistence pays off.
Thanks for hanging there. Rarely can we pick up all of it in one pass, because there is just too much great info.
Thank you! Great tutorial. Clear explanations :-)
You are welcome.
This was quite helpful, thank you very much Tim!
You are welcome.
very good tutorial love way of teaching why we need and when we should use
Thank you!
Great video, nice and clear! Looking forward to the Async video / threading video.
Thanks!
This tutorial is better than the one on pluralsight for sure. However, it's still a little confusing having three different types of delegates passed into a single function, especially as a tutorial. I also noticed a few times you mentioned this isn't how we would actually want to do it, which is usually not something you should be showing people who have absolutely no idea what delegates are. I like to learn best practices, and while this isn't a tutorial on best practices, I want to see delegates used in cases where it makes sense to use them, where they are one of the best solutions for a particular problem.
I really would have liked to see some cleanup, instead of using 3 delegates, clean it up and just use 1.
He still encompassed the power of delegates and their use if you watch to the end. He mentioned "this isn't how you'd be using delegates" as a preface to saying he was over using them to show the different types. Stop relying on him and use your programmer mind. How would you condense it into 1? Its easy, all those delegates can actually be made into one single function and delegate. You can do the whole calculation, and message alerts, using one method, and pass that single method to a delegate that returns what you need. He just extrapolated it into the different types for educative purposes.
It doesn't mean it isn't the proper way to use delegates. This is still the proper way. If you watched the WinUI section of the video, you will see how convenient those delegates ended up being. You can run code in classes completely unrelated and have it compile and work.
Thanks
Thank you!
Figured out it is just a function pointer within the first 10 minutes. Thanks.
You are welcome.
I remember your video about the concept of interface so much that I could relate it with delegates.
Great!
I recomend to move the CalculateMethod to the Library project rather than implementing it in Console and WinForm projects. But thanks for the class. It is awesome I learned a lot
You are welcome.
Hi Tim. Well, after months since the first time I watched this, I came back to watch it again. There are points in your course that could be easily missed unless someone came across with in real world. I'm getting used to the delegates (Func and Action actually) when starting separating some codes into libraries. You mentioned the interface at the beginning of this video. I think both interface and delegate are sort of concepts which a programmer need change his/her mindset. I don’t know; however, I believe their application in a code is a big step getting away from classic programming style, otherwise something always whispers in the ears what is the point of using them when things can be done without them. (a false statement of course :) )?
Thank you again.
Thank you for this! Im not a native speaker but these tutorials are very easy to follow 👍.
Awesome!
@CloroxBleach then maybe you can explain it to me :)
@CloroxBleach then maybe you can explain it to me :)
Your channel is awesome, this helped me so much!! Thank you so much!!
You are welcome.
Hi Tim, thanks for this video, I would like to ask you about what is the video where you talk how to use delegates in a async way?
Great lesson Tim, thank you.
You are welcome.
Wonderful and simple. Love your work!
Thank you so much!