zoukankan      html  css  js  c++  java
  • C# Logical Operators

    Logical Operators
    Logical operators perform Boolean logic on two expressions. There are three types of logical operators in C#: bitwise, Boolean, and conditional.
    The bitwise logical operators perform Boolean logic on corresponding bits of two integral expressions. Valid integral types are the signed and unsigned int and long types. C#
    promotes byte to int, which is why the example in the prevous section worked. The bitwise logical operators return a compatible integral result with each bit conforming to
    the Boolean evaluation.
    Boolean logical operators perform Boolean logic upon two Boolean expressions. The expression on the left is evaluated, and then the expression on the right is evaluated. Finally, the
    two expressions are evaluated together in the context of the Boolean logical operator between them. They return a bool result corresponding to the type of operator used.
    The conditional logical operators operate much the same way as the Boolean logical operators with one exception: When the first expression is evaluated and found to satisfy the
    results of the entire expression, the second expression is not evaluated. This is efficient because it doesn’t make sense to continue evaluating an expression when the result is
    already known.
  • 相关阅读:
    XML属性
    4.9Java游戏项目练习
    关于JVM结构的学习
    HelloWorld之Struts2
    进程调度
    JVM垃圾回收总结
    学会阅读Java字节码
    关于产品需求文档的各种D
    刘强东学习亚马逊:控制供应链 技术是最大障碍
    JVM内存溢出的方式
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1670619.html
Copyright © 2011-2022 走看看