该事件只能出现在=或 - =的左侧

时间:2013-02-03 14:03:43

标签: c#-4.0

我在这段代码中遇到了一些问题..有人帮助我

public event EventHandler CollectionChanged
        {
            [MethodImpl(MethodImplOptions.Synchronized)]
            add
            {
                this.CollectionChanged = (EventHandler)Delegate.Combine(this.CollectionChanged, value);
            }
            [MethodImpl(MethodImplOptions.Synchronized)]
            remove
            {
                this.CollectionChanged = (EventHandler)Delegate.Remove(this.CollectionChanged, value);
            }
        }

问候 沙瓦

0 个答案:

没有答案