这可能在一个类中具有同名的属性和事件,例如:
private BusyChangedDelegate BusyChanged;
public event BusyChangedDelegate BusyChanged
{
.
.
.
}
编辑 完整源
private BusyChangedDelegate BusyChanged;
public event BusyChangedDelegate BusyChanged
{
add
{
BusyChangedDelegate delegate3;
BusyChangedDelegate busyChanged = this.BusyChanged;
do
{
delegate3 = busyChanged;
BusyChangedDelegate delegate4 = (BusyChangedDelegate) Delegate.Combine(delegate3, value);
busyChanged = Interlocked.CompareExchange<BusyChangedDelegate>(ref this.BusyChanged, delegate4, delegate3);
}
while (busyChanged != delegate3);
}
remove
{
BusyChangedDelegate delegate3;
BusyChangedDelegate busyChanged = this.BusyChanged;
do
{
delegate3 = busyChanged;
BusyChangedDelegate delegate4 = (BusyChangedDelegate) Delegate.Remove(delegate3, value);
busyChanged = Interlocked.CompareExchange<BusyChangedDelegate>(ref this.BusyChanged, delegate4, delegate3);
}
while (busyChanged != delegate3);
}
}