// Remove member from the invocation lists.
public void RemoveAboutToBlow(AboutToBlow clientMethod)
{ almostDeadList -= clientMethod; }
public void RemoveExploded(Exploded clientMethod)
{ explodedList -= clientMethod; }
...
}
Again, the -= syntax is simply a shorthand notation for manually calling the static Delegate.
Remove() method, as illustrated by the following CIL code for the RemoveAboutToBlow() member of
the Car type:
.method public hidebysig instance void RemoveAboutToBlow(class
CarDelegate.Car/AboutToBlow clientMethod) cil managed
{
.maxstack 8
ldarg.0
dup
ldfld class CarDelegate.Car/AboutToBlow CarDelegate.Car::almostDeadList
ldarg.1
Do'stlaringiz bilan baham: |