Yes, that is good style.
The alternative (which would be bad) would be to do this:
public bool ifelse(int i)
{
if(i == 5)
{
return true;
}
else
{
return false;
}
}
The reason multiple return points are regarded as bad style is that especially for larger methods it can be difficult to keep track of the program flow within a method because it could exit at any point. This can be a nightmare to debug. If you have a return variable that you assign to however, you can watch that variable and know exactly when it will be returned (from a single place).
This isn't always the case, as with every stylistic point in programming there are good sides to it and bad sides.