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

it2022-05-08  6

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.

转载于:https://www.cnblogs.com/zhtf2014/archive/2011/02/19/1958464.html

相关资源:垃圾分类数据集及代码

最新回复(0)