boolean conditional statements..

Jul 26, 2011 at 10:57 AM

Hi,

 

Ok = IsEverythingOK();

 if(Ok)

 

//Avoid

if(IsEverythingOK())

 {

 }

 regards,

 gnanavel.r

 

{

 

}

 

 

 

Avoid method call in boolean conditional statements .How to achieve this rule using stylecop.

 

bool IsEverythingOK()

{

}

//Correct

bool