📌  相关文章
📜  如何检查数组中的每个元素是否为真c#代码示例

📅  最后修改于: 2022-03-11 14:48:53.686000             🧑  作者: Mango

代码示例1
private bool noBricksLeft () {
    for (int i = 0; i < brick.GetLength(0); i++) {
        // inverted your condition; we can short-circuit
        // and just return false
        if (brickLocation[i, 2] != 0)
            return false;
    }
    // every brick passed our condition, so return true
    return true;
}