if-else 二则?只要 if,不要 else

 1 public void DummyFunction()
 2 {
 3     if (itsTrue)
 4     {
 5         DoSomething();
 6         return;
 7     }
 8 
 9     DoAnotherThing();
10 }

 

posted @ 2025-01-09 20:28  凌枫玖  阅读(6)  评论(0)    收藏  举报