为什么我们使用委托人? [英] why we use delegates?

查看:99
本文介绍了为什么我们使用委托人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,目前我正在学习与会代表.我可以理解代表的基本知识.但我不明白他们的真正用处.我想知道必须使用委托的情况,如果不使用委托,我们将无法执行任何操作.
我想通过vb.net中的一个很好的例子来理解这一点.请做有需要的.谢谢.

hi to all, currently i am learning about delegates. i could understand basics of delegates. but i can''t understand their real usefulness. i want to know situation in which we must use delegates, and without use of them we can''t perform any action.
i want to understand this by some good example in vb.net. please do needful. thanks.

推荐答案

请查看我过去关于该主题的答案;请从第一个参考文献的第一句话开始:

我们为什么使用代表 [委托的额外优势是什么 [ ^ ],
在C#中,委托的优点是什么.NET? [ ^ ].

请理解,如果您没有立即看到有用性,则意味着您不真正了解此功能的工作原理(.NET委托的功能比某些其他技术要先进得多,并且没有得到很好的解释).因此,您可以从实践中了解它.您只需要查看它们在某些API中的用法即可.当您开始使用它们时,您可能会停止了解如果没有它们,您将如何生活. :-)

—SA
Please see my past answers on the topic; please start with the first sentence of the first reference:

Why we use Delegates[^],
What is the Extra Advantage of Delegate[^],
What are the advantages of delegates in C#.NET?[^].

Please understand that if you don''t see the usefulness immediately, it means you don''t really understand how this feature works (and the functionality of .NET delegates is much more advanced then in some other technologies and not well explained). Therefore, you can understand it from practice. You just need to see how they are used in some APIs. When you start using them, you will probably stop understanding how could you live without them. :-)

—SA


这篇关于为什么我们使用委托人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆