Ray's playground

 

Item 30: Prefer Overrides to Event Handlers(Effective C#)

When you have one function that handles one event in a derived class, the override is the better approach. It is easier to maintain, more likely to be correct over time, and more efficient. Reserve the event handlers for other uses. Prefer overriding the base class implementation to attaching an event handler.

posted on 2011-02-19 13:06  Ray Z  阅读(199)  评论(0编辑  收藏  举报

导航