委托与委托的关键字
如果你想创建自定义的代表,你会使用小写委托关键字。
If you like to create custom delegates you would use the delegate keyword in lowercase.
你可以做什么与实际委托类?这是什么好?不明白确切的差异。
What can you do with the actual Delegate Class? What is this good for? Don't understand the exact difference.
从http://msdn.microsoft.com/en-us/library/system.delegate.aspx:
在代理
类的基类
对于委托类型。然而,只有
系统和编译器可以得到
明确从代理
类或
从 MulticastDelegate
类。它
也不允许以导出
新型的委托类型。该
代理
类不被认为是
委托类型;它是用一类
派生委托类型。
The
Delegate
class is the base class for delegate types. However, only the system and compilers can derive explicitly from theDelegate
class or from theMulticastDelegate
class. It is also not permissible to derive a new type from a delegate type. TheDelegate
class is not considered a delegate type; it is a class used to derive delegate types.
大多数语言实施代理
关键字,编译器对于那些
语言都能够从派生
MulticastDelegate
类;因此,
用户应使用代理
关键词
由语言提供的。
Most languages implement a delegate
keyword, and compilers for those
languages are able to derive from the
MulticastDelegate
class; therefore,
users should use the delegate
keyword
provided by the language.