What does the operator “<<” mean in C#?

前端 未结 9 1133
无人共我
无人共我 2020-12-05 22:57

I was doing some basic audio programming in C# using the NAudio package and I came across the following expression and I have no idea what it means, as i\'ve never seen the

9条回答
  •  悲&欢浪女
    2020-12-05 23:41

    The "<<" is a shift left operator. x << y shifts bit pattern x y position left.

    For example, if x was 0001 0101 and y was 1 then the result would be 0010 1010. It's like someone's pushed each bit left one.

提交回复
热议问题