C# 委托
委托是一种引用方法的类型。一旦为委托分配了方法,委托将与该方法具有完全相同的行为。委托方法的使用可以像其他任何方法一样,具有参数和返回值
A delegate declaration
defines a reference type
that can be used to
encapsulate a method
with a specific signature.
A delegate instance
encapsulates a static or
an instance method.
Delegates are roughly
similar to function
pointers in C++; however,
delegates are type-safe
and secure.
MSDN
Microsoft
C# delegate is a callback
function. It is smarter
then “standard” callback
because it allows
defining a strict list of
parameters which are
passed from class-server
to class-client.
CodeProject

浙公网安备 33010602011771号