+ 1
What is the use of >>= and <<= assignment operators in C#
Please try to explain with examples. I have done a lot of research on this and it just keeps getting harder to get. & Thanks in advance for your reply
1 Odpowiedź
+ 6
>> is bitwise right shift operator. And >>= is short form expression.
Ex:
x = x >> 1 ; short form is x >>= 1;
Similarly
<< is bitwise left shift operator. And <<= is short form expression.
Ex:
x = x << 1 ; short formly x <<= 1;
edit:
https://www.sololearn.com/learn/4086/?ref=app
https://www.sololearn.com/learn/4087/?ref=app