@ahmed salah , Welcome to Microsoft Q&A, you could refer to the following link to know when we should the delegate.
When would you use delegates in C#?
Including the following points:
- Event handlers (for GUI and more)
- Starting threads
- Callbacks (e.g. for async APIs)
- LINQ and similar (List.Find etc)
- Anywhere else where I want to effectively apply "template" code with some specialized logic inside (where the delegate provides the specialization) i mean cases it must use delegate and event
If you mean that you want to use event, it is often used in GUI app. (First Point)
Hope my explanation could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.