ViIvanov

Untitled

Apr 8th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. // We need change Some to true only when check() returns true.
  2.  
  3. // #1
  4. if(check()) {
  5.   Some = true;
  6. }//if
  7.  
  8. // #2 - После буленовой проверки явно выставлять true/false - моветон
  9. var b = check();
  10. if(b) {
  11.   Some = b; // Выставляем неявно. Стало лучше?
  12. }//if
Advertisement
Add Comment
Please, Sign In to add comment