Finished Defining an Event & Subscribing to an Event, repo at a616297
parent
24b1c07128
commit
8fc9379a84
@ -169,4 +169,15 @@ A Multicast Delegate is a delegate that holds the references of more than one fu
|
||||
* use += operator to chain delegates together and -= operator to remove.
|
||||
* A multicast delegate invokes the methods in the invocation list, in the same order in which they are added.
|
||||
|
||||
Overall, delegate enable us to declare a method that used like a variable.
|
||||
Overall, delegate enable us to declare a method that used like a variable.
|
||||
|
||||
## Defining an Event & Subscribing to an Event
|
||||
|
||||
Reference:
|
||||
* [event (C# reference)](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/event)
|
||||
|
||||
Using delegate, we can implement Event Handler in C# to achieve subscription.
|
||||
|
||||
Event is not popular within ASP.NET, but very popular in desktop app & Mobile development (e.g. mouse clicking, keyboard pressing)
|
||||
|
||||
TODO: research this part. It's very complicated.
|
Loading…
x
Reference in New Issue
Block a user