https://msdn.microsoft.com/en-us/library/6a71f45d.aspx
Logical OR Operator 按位或
This operator has higher precedence than the next section and lower precedence than the previous section. NOTE, you can click on the operator to go the details page with examples.
x | y – logical or bitwise OR. Use with integer types and enum
types is generally allowed.
Conditional OR Operator 条件或
This operator has higher precedence than the next section and lower precedence than the previous section. NOTE, you can click on the operator to go the details page with examples.
x || y – logical OR. If the first operand is true, then C# does not evaluate the second operand.
Logical AND Operator 按位与
This operator has higher precedence than the next section and lower precedence than the previous section. NOTE, you can click on the operator to go the details page with examples.
x & y – logical or bitwise AND. Use with integer types and enum
types is generally allowed.
Conditional AND Operator 条件与
This operator has higher precedence than the next section and lower precedence than the previous section. NOTE, you can click on the operator to go the details page with examples.
x && y – logical AND. If the first operand is false, then C# does not evaluate the second operand.
http://yyys8517750.iteye.com/blog/1258457
转载于:https://www.cnblogs.com/chucklu/p/4011297.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/96875970
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~