Trying to understand the code in Delphi:
var r: byte; rbuf: array[0..1024] of Byte; begin ... r := rbuf[3] and 1; ... end Tell me which operator performs the same actions as the "And" operator but in C #.
There are two types and :
booleanintegerC # uses its own operator for each case:
Since the question uses integers as operands, the analogous code in C # would be: rbuf[3] & 1;
bool operands, then & will be as boolean И , and not as bitwise - Andrey NOPThe & operator in C # performs the same actions as the and operator in Delphi.
Source: https://ru.stackoverflow.com/questions/750773/
All Articles
&operator. - VladD