Комментарии:
As a junior game dev i can say this helped me a lot. Thanks for your efforts
Ответитьthis is Gold
Ответитьman this video was so helpful! thanks so much for this tutorial, it was so simple to follow!
ОтветитьBest instructor
ОтветитьThank you Mosh!
ОтветитьThanks for the easy explanation.
ОтветитьIn-depth, Easy to understand the Scenario of Events & Delegates, i have seen lots of videos to understand some confusion but this is one of the best to explain this subject.
And obviously, in my Software Engineering life, i always ping Sir Mosh to understand solutions in-depth.
Thank you for this course... it's very easy to understand.
Ответитьamazing video , clear concepts!!!!!!!!!!11
ОтветитьTo shorten and make the code more concise:
At time of invoking the event we can do this =>
VideoEncoded?.Invoke(this, EventArgs.Empty);
On the above code,
The "?" Is the null checking operator which won't invoke the event unless it is not null. And invoke is same as writing VideoEncoded(); but we need the invoke because we are checking the null on the event.
Instead of the checking with != null.
Hello, Mosh! Thank you for lessons! Could you please make subtitles available? English is not my native language, and I would find it more convenient to have subtitles available for reading. Thank you in advance!
ОтветитьOff to a really bad start with the example. I'm not a video editor so trying to explain it in terms of video editing is pointless. You also only say it's meant to save time on recompiling code, but code only takes a few seconds to compile so I don't see why we are using such a complicated process to save a literal second of time. I'm sure if you're a seasoned programmer you could probably find use for this, but for beginners or someone trying to learn you've totally failed right out the gate to make sense of this.
Ответить1000th comment
Ответить999th comment
ОтветитьThank you for clear explanations and the informations !
ОтветитьThanks a lot
ОтветитьTHANKS!
ОтветитьIve been trying to get a clear explanation of how events work for weeks. Best explanation I have found. Thank you.
ОтветитьHey I know this video is old, but this is one of the better tutorials out there! Thanks for making these!
ОтветитьAmazing, Thank you Man.
ОтветитьYears after the fact and this is still the best video that explains this subject. Thank you so much for your simple, no-nonsense explanation and easing the viewer into the more complex subject matter only after explaining the absolute basics.
ОтветитьCrystal clear explanations. Thanks!
Ответитьchatgpt recommened me to wwatch this
ОтветитьHave been searching explanation about this topic. Hopefully I get my 3mins worth spent.
ОтветитьGreat video. Really helpful keeping the delegate explicit until the end so that the 'magic' EventHandler<t> made some sense.
ОтветитьAwesome. Thank you Mosh.
ОтветитьFrom my understanding
... an event is a reference type variable
... capable of containing multiple method references
... of a specified delegate signature
... which is triggered in a source object.
So it basically is a variable that can trigger multiple methods in one statement.
Right?
When you talk about compiling video encoder separate to mail service etc. Are you saying that you would have each class in a separate project, so that when you have to build in the future there doesn't need to be any communication between them?
Or is it building each as a separate dll, that you link in the project. But building a project, even if you add a new class generally you will still need to recompile the project. Just asking for a little clarity on what you meant by only compiling the new class separate to the whole class.
Jhand explanation
ОтветитьVery helpful. Subscribed. Teach me to code please 🙏
ОтветитьAwesome
ОтветитьMosh you are the C# boss
ОтветитьC# Events and Delegates Made Complex
ОтветитьIs there a subtitle for this tutorial?
ОтветитьWhen we already set the Product class as a type to T
Why exactly we need here Generic class when we already assigning it Product class so apparently it does not seem generic any more.
Can someone explain the purpose here to use generic ????
Thank you Mosh, clearly and well explained. event handlers are exciting !
Ответитьآقای همدانی از زحمات شما تشکر میکنم.
ОтветитьTechnically is in non-individual (ordinary, where I do not need anything special) case matter if I have own "EventArgs" or I am using the source object to precisely determine which "action" is done?Let's say I have a collection to process and I run it via Parallel.ForEach.
ОтветитьThank you so much, I finally made my first working customised event in c# thanks to you
ОтветитьReally good explanation of how to use an event. Nicely brought it all together when you replaced the initial delegate definition (at the start) with the EventHandler defiinition at the end. The only thing I would add is that many people might not understand the reason to actually use the keyword "event" in the VideoEncoder class. Removing this keyword will result in this code example to still work HOWEVER this keyword is still necessary. (basically it provides protection to the Event so as not to be abused by other outside objects).
ОтветитьI review this tutorials two times thank you for your outstanding work Mosh
ОтветитьThank you for this video! Delegates and why we use them was a difficult topic to wrap my head around, but this video was a perfect explanation. Very easy to follow and understand.
ОтветитьI was trying to learn this from "C# in a Nutshell" book and that was kind of dry.
This was a superb explanation, absolutely perfect teaching Mosh, thank you!
Thank you so much! This was so clear and in-depth, and I'm excited to start using events now!! :)
ОтветитьHow often do you use even and delegates in real life?
Ответитьmidroll in video about a confusing topic (which you acknowledge) = boo. Thanks for interrupting yourself just as I was almost understanding. Now I have to back up.
ОтветитьOkay so I was short on time and I had to write a code snippet using delegates and events. I found this 30 minutes video and some others but being aware of the simplicity of Programming with Mosh, I decided to watch this one. And after completing it "I am here to confirm that I now have a very clear and pretty good understanding of Events and Delegates and can write code using them". Hence, proved once again that Mosh Hamedani is one of the best teachers in explaining things at the most easiest level. Thank you so much, God bless!
ОтветитьI have seen many Video about Events and Delegates but i found this one the best one
ОтветитьOne question. I have a class that has an event. Another class needs to know only when it happens and another class needs to know when it happens and one variable of the event class. How would you guys solve this in the best way? One Event with a parameter and one event without or should i make that Event without Parameter and the class that needs the variable directly gets IT from the class?
ОтветитьSuperb... I used to be always confused on tie up between event and delagates and how to invoke it. This video gave a very clear picture. Thank you Mosh
Ответить