+ 1

How do these operators work? (C#)

1. >> 2. << 3. ^= 4. |= I can no idea how are they working. ------------------------------------------------------------ What is output of the following code? int x = 4; x>>=10; Console.Write(x + "/"); x=4; x<<=5; Console.Write(x + "/"); x=4; x^=3; Console.Write(x + "/"); x=4; x|=2; Console.Write(x);

12th Dec 2017, 1:51 PM
Amadeus
Amadeus - avatar
1 ответ
+ 3
See the C# operators documentation at the following link: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/ Hth, cmiiw
18th Dec 2017, 10:49 AM
Ipang