时间: 2020-11-22|65次围观|0 条评论

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

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《|和||以及&和&&
   

还没有人抢沙发呢~