August 2008
1 post
2 tags
Looping through Constants and other Fields
In a project I inherited I noticed that the previous Developer made heavy use of Constants and tended to do some rather laborious if/then conditional checks related to these Constants. Here is the pattern of code used:
if (MethodToCheckIfNeeded(Class.Constant))
return (MethodToDoAction(Class.Constant);
* This source code was highlighted with Source Code Highlighter.
NOTE: You would replace...