\[~ann.campbell.2] This rule should not be only about complete method or loop bodies. It can be partial as well:
----
public void AnyMethod()
{
CallSomeOtherMethod1();
CallSomeOtherMethod2();
CallSomeOtherMethod3();
if (someCondition)
{
CallSomeOtherMethod4();
CallSomeOtherMethod5();
}
}
----
can be converted to
----
public void AnyMethod()
{
CallSomeOtherMethod1();
CallSomeOtherMethod2();
CallSomeOtherMethod3();
if (!someCondition)
{
return;
}
CallSomeOtherMethod4();
CallSomeOtherMethod5();
}
----
If the last statement in a method or loop is an ``++if++`` we can do this transformation. (And as a consequence if the only statement in a method is an ``++if++``, we can also do it.)