This section mainly talks about the following types of events.
The events we are talking about are divided into two types. One is the built-in events such as our page events or control events, and the other is the custom events in the custom classes we will talk about below.
You can define your own events in custom classes and create event procedures that run when these events occur. Creating custom events is slightly more complicated than creating event procedures for built-in events because your code must invoke the custom event in response to something happening within the code.
For example, I found that there were no cigarettes, and asked my son to buy cigarettes for you. Then he followed your instructions and bought the cigarettes with the money you gave. Then you found that there were no cigarettes, and the event (Event) is It was generated, and then I, the Event Sender, told the little guy (the delegate of the event) the news, and he went to the supermarket, the Event Receiver.
If in the above example, my son - Event Delegate has two pieces of information, one is who has no cigarettes, and the other is what brand to buy.
I won’t go into more details. The more I talk about it, the more confused I am. Let’s take a look. Let’s take an example!
In this example, we will review all the previous things about classes. hehe!
There are many different opinions about similar incidents. I personally think that the explanation is not important. As a result, we did it and it worked for us. That’s right!