C# Feature - Unsigned right shift
Overview
Section titled “Overview”The unsigned right shift operator >>> shifts bits right and fills the left side with zeros, even for signed operands.
Introduced In
Section titled “Introduced In”C# 11.0 (2022)
Before
Section titled “Before”int shifted = (int)((uint)value >> 2);int shifted = value >>> 2;Gotchas & Best Practices
Section titled “Gotchas & Best Practices”- Use
>>>when bit-level behavior matters more than arithmetic sign preservation. - Prefer ordinary
>>for arithmetic right shifts.