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
events
-
Putin comes across as competent and credible. His viewpoint naturally advances Russia's interests, but he backs it up well.
1 FaverViewed: 2 TimesQuoted: CNN's Matthew Chance interviewed Russian Prime Minister Vladimir Putin on Thursday.
- shiwani - 18 days ago2 FaversViewed: 2 Times
- energy - Jan 17 20081 FaverViewed: 45 Times
asp.net
-
1 FaverViewed: 8 TimesQuoted: A chat application demonstrating a reusable API for COMET and ASP.NET (following on from a previous article).; Author: James Simpson; Section: ASP.NET; Chapter: Web Development
- SharpSmith - Jul 15 20081 FaverViewed: 6 Times
- SharpSmith - Jul 15 20081 FaverViewed: 4 Times
