What is the C# equivalent of Java unsigned right shift operator >>>

前端 未结 5 2184
轮回少年
轮回少年 2020-12-07 00:32

I am trying to convert some Java code to C#. How can the following unsigned right shift operation be represented in C#?

int src1, src2, ans;
ans = src1 >&         


        
5条回答
  •  庸人自扰
    2020-12-07 01:01

    I think it's just >> whether it is signed or not depends on whether it is an int/long or uint/ulong, so you would have to cast as necessary

提交回复
热议问题