What is the second meaning of a single ampersand in C#?

后端 未结 6 890
孤城傲影
孤城傲影 2021-02-14 03:52

I have used the single ampersand (&) in C# to mean \"check the second conditional statement even if the first is false\".

But the

6条回答
  •  天涯浪人
    2021-02-14 04:28

    The ampersand represents a bitwise AND operation. A bitwise operator returns the result of a comparison between each corresponding bit in the two operands.

    For example, if x is 0110 and y is 1010, then a bitwise AND of x and y (x & y) results in 0010.

提交回复
热议问题