C# Events
HTML-код
- Опубликовано: 26 авг 2024
- Coding Tutorial: Most C# developers use events, but do you know how they relate to delegates? Have you ever implemented an event manually? All is explained here.
Source code available at: github.com/Jas...
Anything else you'd like to see a video on? Just let me know.
You can find the source at github.com/JasperKent/Events
And to be kept up-to-date, subscribe here: ruclips.net/channel/UCqWQzlUDdllnLmtgfSgYTCA
The best video about delegates and events I have ever watched
your content is addictively good! thank you so much.
Enjoyong your tutorials! I’m not sure why you don’t get more views or have more followers!!
Two suggestions: Change your theme to a dark theme. That white theme is blinding and I think you’ll see that most of the bigger channels use a dark theme (along with ligatures).
Also... there are times were you expect users to be strong in C#. This video had an instance where I had to look up what you meant by auto generated properties. You didn’t mention exactly what they were or refer to another video if I didn’t know what they were. I think you expect that people watch your videos in order, but most people like me come into your video stream in the middle. I’m betting most people don’t take the time to go back and watch your first videos and possibly leave in frustration. It happened to me in another video where you just started using “out” and I got lost.
I hope that information is helpful. I really enjoy your video so please keep them coming!
I've added a link to the video that covers properties.
Thank you, you are the best now I got it
Very good lesson, thank you for the great info and presentation.
At 16:10, I got a bit lost and had to go back and watch things over a couple times. I would’ve appreciated you walking through the code one more time just to show how the finalized version worked from the start of the code.
Thanks, really good. One thing that I find painful is how to remove event handlers which were added conditionally. If I added the handler based on some condition, I need to check the condition later (but maybe the condition has changed). Is there a way to do this rigorously without setting a flag if we added a handler?
You shouldn't need to check anything at all. If you attempt to remove an event handler that hasn't been added, then the operation is simply ignored. There's no exception thrown.
@@CodingTutorialsAreGo Ok, thanks. The issue comes when multiple code paths may add/remove the same callback and one which didn't add it removes it and affects the other's behaviour. Maybe I'm just wrong in assuming that you can add the same callback multiple times and remove it multiple times symmetrically, and should probably avoid the situation altogether by not having multiple conditional add/remove code paths. Don't know if I'm making sense.
I love you vedios but this time I get lost. This topic needed to be in more vedios
I'll look into that.