What &= operator do?

Viewed 29

i just starting to learn c# and cant really understands what this operator do. Can somebody explain in easy language? Below example of my code.

int z = 4;
z &= 599;
Console.WriteLine(z);
1 Answers

Writing z &= 599 is same as writing z = z & 599, which is a bitwise operator. If you want to learn about bitwise operators, here have I found a great website for reference for C#.

Related