mohit | Shared With: Everyone - Mar 25 2008 | events, development, c#, asp.net, codesmell
Quoted: Whether you put your logic before or after calling base really depends on the scenario. Personally I always call base last, at the bottom of the method, just because in general I think it makes sense for my component/control to do its own 'X' before raising the 'X' event for external listeners to respond to. If I want to know about anything those external listeners have done to me, then I could have more code after calling base. But let me just say I can't really even think of a time where this should matter. If you end up with code that needs to worry about this, then just pause and consider your design, it's a CodeSmell. You should be able to design it in a manner that doesn't depend on such subtlety.
Related Content from Around Faves
developer
-
Zach's greatly improved the look of this sample app - and now the Save dialog comes up when you try to create a save (you need to fill in username, password, and email address to create an account).
2 FaversViewed: 22 Times - Tosh - Sep 04 20081 FaverViewed: 13 Times
- petersigrist - Sep 06 20081 FaverViewed: 7 Times
asp.net
- 1 FaverViewed: 10 Times
- SharpSmith - Jul 15 20081 FaverViewed: 8 Times
- SharpSmith - Jul 15 20081 FaverViewed: 6 Times
