نکتهای در بکارگیری & بر روی متغیرهای bool به مناسبت 200 امین سالگرد تولد George Boole
نویسنده: وحید نصیری
تاریخ: ۱۳۹۴/۰۸/۱۲ ۱۴:۳۵
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
bool totalSuccess = First() & Second();
If you want both operations to happen regardless of whether the first succeeded then using && would be wrong. (And similarly if you want to know if either succeeded, you’d use | instead of ||.)