What are some examples of where you would use Delegates in C#/VB.NET and why would you want to use delegates?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I use delegates all the time to respond to certain user interaction events. It lets me add functionality for mouseover events, audio started/stopped/playing events, and the like.
Really, delegates are GREAT for when you know you need to respond to a user-initiated event, but you cannot anticipate when that event will occur.