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.
 
Back
Top