为什么Microsoft引入委托和匿名方法? [英] Why Microsoft introduce Delegate and Anonymous Methods?
本文介绍了为什么Microsoft引入委托和匿名方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么Microsoft会引入委托和匿名方法?
是否(委托)执行c#中的任何其他内容?
如何实时使用代理?
Why Microsoft introduce Delegate and Anonymous Methods?
Is it(Delegate) implementation of any other thing in c#?
How delegates are used in real time?
推荐答案
你没有阅读文档,是吗?
来自MSDN上的委托(C#参考)[ ^ ]:
You did not read the documentation, did you?
From "delegate (C# Reference)" at MSDN[^]:
委托是一种可用于封装命名或匿名方法的引用类型。委托类似于C ++中的函数指针;但是,代表们是类型安全且安全的。对于代理人的申请,请参阅代表和通用代表。
A delegate is a reference type that can be used to encapsulate a named or an anonymous method. Delegates are similar to function pointers in C++; however, delegates are type-safe and secure. For applications of delegates, see Delegates and Generic Delegates.
以同样的方式,您可以找到关于< MSDN
文档。 a href =http://msdn.microsoft.com/en-us/library/0yw3tz5k.aspx>匿名方法 [ ^ ]。
In the same way you may find pretty informative the MSDN
documentation on "Anonymous Methods"[^].
这篇关于为什么Microsoft引入委托和匿名方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文