Equivalent of Java triple shift operator (>>>) in C#?

Edit: The Unsigned right-shift operator >>> is now also available in C# 11 and later.

For earlier C# versions, you can use unsigned integer types, and then the << and >> do what you expect. The MSDN documentation on shift operators gives you the details.

Since Java doesn’t support unsigned integers (apart from char), this additional operator became necessary.

Leave a Comment