Posted By

tecnoplaga on 01/07/19


Tagged

java shift


Versions (?)

n >>> s in Java equivalent


 / Published in: C#
 

There is no >>> operator in C#. But you can convert your value like int,long,Int16,Int32,Int64 to unsigned uint, ulong, UInt16,UInt32,UInt64 etc.

  1. // https://stackoverflow.com/questions/1880172/equivalent-of-java-triple-shift-operator-in-c
  2. private long getUnsignedRightShift(long value,int s)
  3. {
  4. return (long)((ulong)value >> s);
  5. }

Report this snippet  

You need to login to post a comment.