Just walked through referencesource.microsoft.com (line 217)
and discovered "|=" operator. What does it means? I assume it some sort of Boolean operation- but can't get what exactly it means. Does it mean "or equal", short form like "a= a|b" ?
Just walked through referencesource.microsoft.com (line 217)
and discovered "|=" operator. What does it means? I assume it some sort of Boolean operation- but can't get what exactly it means. Does it mean "or equal", short form like "a= a|b" ?
|=
is to =
what +=
is to =
. Just a shortcut to avoid the writing of a = a | b
its a bitwise inclusive OR and assignment operator.
For details refer https://msdn.microsoft.com/en-us/library/ms173224.aspx
You are correct. This operator is known as the "OR assignment" operator and a |= b is equivalent to a = a | b. Here is the documentation.