Not a problem I'm having, just a thought I had and had no idea.
Assume you want to check through numerous possibilities, for example:
if(x > 1000)
{
return 1000;
}
if(x > 990)
{
return 1010;
}
if(x > 980)
{
return 33;
}
if(x > 970)
{
return 2;
}
if(x > 960)
{
return null;
}
In that situation, I could also use else if's instead of just entering a new if, and it would have the exact same effect. Is there a performance difference at all? If there is, what is the "more correct" way to do it?