I've been using ReSharper for a while now and sometimes it suggests that I invert the if
. I guess an example would be a better explanation of my situation:
public void myfunction(int exampleParam){
if(exampleParam > 0){
//Do something with form controls for example.
}
}
Now ReSharper suggests that I invert the if
to this:
public void myfunction(int exampleParam){
if(exampleParam <= 0)
return;
//Do something with form controls for example
}
Does this "improve" performance somehow? Or is it just aesthetic?