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

  • SEARCH
  • Home
  • 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 8175203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:41:44+00:00 2026-06-06T22:41:44+00:00

An Int64 variable needs to be shifted. I am parsing pseudo mathematical functions from

  • 0

An Int64 variable needs to be shifted. I am parsing pseudo mathematical functions from a database file. The Variables are uint32 or int32 so i did put them into an Int64 to handle them equally without loosing anything. In one of my treenodes i need to bitshift Int64.

Unfortunately the shift operator does not apply to Int64. Is there a standard way of bit shifting Int64 that i am not aware of?

//Int32 Example works
int a32 = 1;
int b32 = 2;
int c32 = a32 >> b32;

//Int64 Example does not compile
Int64 a64 = 1;
Int64 b64 = 2;
Int64 c64 = a64 >> b64; //invalid operator
  • 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-06-06T22:41:47+00:00Added an answer on June 6, 2026 at 10:41 pm

    I believe the right-hand operand of the right-shift operator (in C#) always takes an int, even if the left-hand operand is not an int.

    Official details here in C# Specification on MSDN.

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

Sidebar

Related Questions

I tried parsing a number with .NET Int64.Parse method, and it won't accept a
I have an existing model implementation that needs to work with a new database.
How I should write: long.MaxValue or Int64.MaxValue ? Are there standard from Microsoft?
Please help me to write Regular expression on C# for getting Int64 value from
I'm trying to store a Int64 variable to data column with bigint data type.
If I use a variable of type Int64 , will it work on all
How can i serialize variable with type of Int64 in JavaScript without loss of
I like having a little visual separation of the type names from the variables
I trying to compile this code: Int64 itag = BitConverter.ToInt64(temp, 0); itag &= 0xFFFFFFFFFFFFFC00;
Have Dictionary <Int64, byte> that gets used a lot. I mean in a loop

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.