Well there couldn't be any result at all (including 'different' one) since the code won't compile. Result of bitwise OR operation is int
, so you have to change flags
type to int
or convert result to byte
:
int flags = ClientFlags.Flag1 | ClientFlags.Flag2;
or
byte flags = (byte)(ClientFlags.Flag1 | ClientFlags.Flag2);
Then you'll get the same result as in C# which is 3
.
If you mean that with .NET you can output result as 'Flag1, Flag2' then you probably will have to implement this by yourself.