© { JSL }
102
Mulitcast delegate
·
a
void
return type
delegate
...
w
can hold multiple callback in its invocation list
w
first in, first called
delegate void
Pred(
string
s);
...
class
Test
{
void
DoThis(
string
s) { ... }
static void
ThenThat(
string
s) { ... }
void
Method(
string
arg)
{
Pred call =
null
;
call +=
new
Pred(
this
.DoThis);
call +=
new
Pred(Test.ThenThat);
...
call(arg);
}
}