Learn C# with CSharpFritz - Get Started with C#: Making our own Types - Methods, Events, & Delegates

preview_player
Показать описание
We've learned what a class is and attached properties and fields to it. How does our class start acting on those properties? I want to interact with that class object. In this session, we'll learn about methods, events, and delegates for interacting and observing actions on a class





#beginner, #csharp #dotnet
Рекомендации по теме
Комментарии
Автор

1:33:33 Delegates: it's about passing pointers to Methods. You treat the supplied variable as a method name, and invoke it using normal method call syntax.
«The caller supplies at least one method that implements part of the algorithm»
The items to work with are the same in all calls, it's only the method that is different.

took me 7 times to watch the same part of the video, and reading Microsoft Docs.
I also had to rewatch episode 3 to catch up with (same themes, one year ago video)

nakigoe_org
Автор

Take a look at episode 3 of the series!
It's more informative to see how the material is typed in real time with explanations.

nakigoe_org
Автор

I don't know why i'm watching these beginners videos, i'm a a professional developer. But I hardly ever use delegates and events. Maybe because I don't do desktop programming anymore (I can see it's useful for button clicks). Maybe i'll introduce some delegates in our backend just to liven things up.

bilbobaggins