Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6190205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:32:44+00:00 2026-05-24T02:32:44+00:00

Possible Duplicate: Equivalent of Java triple shift operators (>>> and <<<) in C#? Java

  • 0

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# ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:32:46+00:00Added an answer on May 24, 2026 at 2:32 am

    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:

    // To perform int result = x >>> 5;
    int x = -10;
    
    uint u = unchecked ((uint) x);
    u = u >> 5;
    
    int result = unchecked ((int) u);
    

    (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#.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Scala equivalent of Java java.lang.Class<T> Object Hi all, I can not call
Possible Duplicate: Is it possible to define enumalpha? Is there any equivalent of Java
Possible Duplicate: Is there an equivalent of ‘which’ on windows? Failed to find it
Possible Duplicate: Is there a VB.NET equivalent for C#'s ?? operator? Is there an
Possible Duplicate: Is a Java static block equivalent to a C# static constructor? Is
Possible Duplicate: JavaScript equivalent to printf/string.format How can I create a Zerofilled value using
Possible Duplicate: Python Ternary Operator Does Python have an equivalent of the ternary operator?:
Possible Duplicate: PHP: Replace umlauts with closest 7-bit ASCII equivalent in an UTF-8 string
Possible Duplicate: Java - escape string to prevent SQL injection I know php has
Possible Duplicate: CompilerServices.Operators equivalent on C# I was looking for Microsoft.CSharp.CompilerServices.Operators but couldn't find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.