I notice C# bitwise operation is very different to C and is difficult
The website I found about bitwise operators in C# shows that they are exactly the same as C, in which case they aren't difficult at all.
It did not work
Not surprising. The "Arduino codes" don't work either. Where did you get that code from?
Pete