Click here to Skip to main content
15,945,119 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I working on csharp i need real example of using delegate with event 

example meaning scenarios and situations i must use delegate and event on it 


What I have tried:

public delegate void MyDelegate(string msg); // declare a delegate
Posted
Updated 20-Nov-22 14:50pm

1 solution

The Microsoft documentation has many examples and explanations beyond what we can offer here: Handling and Raising Events | Microsoft Learn[^] (I have checked and delegates are covered)
 
Share this answer
 
Comments
ahmed_sa 20-Nov-22 21:17pm    
thanks for support i don't ask for code i ask for sample scenario or situation or cases using delegate and events
Graeme_Grant 20-Nov-22 21:51pm    
If you can understand how to use them in code, then examples are easy to come by. This sounds like a homework question, so I'll leave the scenarios to you to come up with. For example, look at any application and you can see many examples of various scenarios of usage.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900