How do you return 'not uint' in C#?

前端 未结 3 717
醉酒成梦
醉酒成梦 2021-01-23 02:56

I have some code written in VB that reads as follows:

Return (Not (crc32Result))

I am trying to convert it to C#, and this is what I have:

3条回答
  •  孤街浪徒
    2021-01-23 03:42

    It looks like what you are trying to do is reverse the bits of crc32result. If so, you want the tilde operator ~.

    return (~crc32Result);
    

    Reference this question.

提交回复
热议问题