不要声明public的event,而应使用事件访问器.

public class Source
{
    private EventHandler _NumberChangeEvent;    
    public event EventHandler NumberChangeEvent
    {
        add
        {
            _NumberChangeEvent += value;
        }
        remove
        {
            _NumberChangeEvent -= value;
        }
    }
}

 

posted @ 2012-06-18 14:02  苦逼面条  阅读(218)  评论(0编辑  收藏  举报