Permalink
Mohit on codesmell
  • vote
    10
    0 starsmohit | Shared With: Everyone - Mar 25 2008 | events, development, c#, asp.net, codesmell
    OnLoad vs. Page_Load vs. Load event - Infinities Loop

    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.

1 - 1 of 1 Faves

Related Content from Around Faves

c

VIEW ALL

asp.net

VIEW ALL