开发者

Examples of usage of delegates in c#.net [closed]

开发者 https://www.devze.com 2023-03-22 23:09 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopen开发者_C百科ed, visit the help center. Closed 11 years ago.

What are some examples of where you would use Delegates in C#/VB.NET and why would you want to use delegates?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号