Unsigned Right Shift Operator (>>>)

  • Thread starter Thread starter Bill
  • Start date Start date
Cast the variable to unsigned.

e.g. if it is a "long":

unsigned long result = ((unsigned long)myVariable) >> myShift;

BTW I have got so used to the new C++ style of casting, where the variable
goes inside brackets and you therefore know unequivocally the scope of the
cast, that I can't imagine why C# uses the old C-style casts.

S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top