Equivalent of Java triple shift operator (>>>) in C#?

前端 未结 6 2089
轻奢々
轻奢々 2020-12-15 17:10

What is the equivalent (in C#) of Java\'s >>> operator?

(Just to clarify, I\'m not referring to the >> and <<

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 17:19

    Upon reading this, I hope my conclusion of use as follows is correct. If not, insights appreciated.

    Java

    i >>>= 1;
    

    C#:

    i = (int)((uint)i >> 1);
    

提交回复
热议问题