Jonas Stawski
Jonas Stawski

Reputation: 6752

What's the equivalent of the >> Java operator in C#

I'm converting some Java code to C# and I came across the >> operator. What is that operator called and what is the equivalent in C#?

I'm trying to convert the following code:

final int pointerIndex = (action & ACTION_POINTER_INDEX_MASK) >> ACTION_POINTER_INDEX_SHIFT;

Thanks,

Upvotes: 0

Views: 180

Answers (3)

cobolstinks
cobolstinks

Reputation: 7153

Never used this but here's the msdn link :C# shift

Upvotes: 1

Christian Ivicevic
Christian Ivicevic

Reputation: 10895

It is a basic shift operator available in many programming languages. In C# it is the same as in Java.

Upvotes: 4

Andrew Cooper
Andrew Cooper

Reputation: 32586

It's the right-shift operator, and it's the same in C#.

Upvotes: 6

Related Questions