Code inspection: Actual shift count equals zero
This inspection reports shift expressions where the effective shift count is zero after C# truncates the right-hand operand. In practice, the expression leaves the left-hand value unchanged, which is usually not what was intended.
Example
int value = 8 << 32;
long other = 56L << 64;
int value = 8 << 31;
long other = 56L << 63;
How to fix
This inspection does not have a dedicated quick-fix. The fix is to use a shift count that matches the actual bit width you intended.
01 April 2026