Author: redowl2 | Posted on: 9/18/2008 2:43:32 AM | Views : 283

 

Hi,

 

Can anybody suggest a design pattern to replace nested if statements I have in my code?

 

e.g

 

public void MyMethod(string aString, string bString, bool aBool)

 

if(ShopperIsValid(aString) & ShopperNameIsValid(bString))

{


if(DeviceIsValid(bString))

{


// do something

 


if(CheckDevice(aBool))

{


if(ShopperAndDevice(aString, aBool))

{


RegisterShopper ...

Go to the complete details ...