|和||以及&和&&
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.