Possible Duplicate:
Equivalent of Java triple shift operators (>>> and <<<) in C#?
Java has operator >>> and <<< which are a bit different then >> and << – can anyone give me its equivalent in C# ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest (or at least most logical) equivalent is effectively an unchecked cast to the equivalent unsigned type, followed by a normal shift and then potentially a cast back again:
(The unchecked part is only relevant if you’re otherwise in a checked context, of course.)
In my experience, times where you normally want to use
>>>in Java, you’d just use unsigned types to start with in C#.