On a sidenote, the completely non-shitposty version would be:
return !(var & 1);
Notice the single &, which should be bitwise AND. Fun thing: negative numbers in two’s complement also have 1 for their LSB when odd. C definitely supports bitwise operators, and it appears C# does as well.
Even the shitposty better version has us:
On a sidenote, the completely non-shitposty version would be:
return !(var & 1);
Notice the single &, which should be bitwise AND. Fun thing: negative numbers in two’s complement also have 1 for their LSB when odd. C definitely supports bitwise operators, and it appears C# does as well.