Multiple IF statements and what to replace them with
I've come across a legacy app that has a large number of conditional statements one after the other and just wondered what approach people have used to make this sort of thing more readable.
The code I have checks values in text boxes and if condition is met a method call is done. This happens for about 12 cases.
I'm thinking I can do something with the textboxes as they will have polymorphic behavior, maybe create a separate method to pass them into?
Anthony Joanes, Apr 05, 2013
please take a look at strategy pattern, business rule.
Tarriq Ferrose Khan, Jun 09, 2013