String.GetHashCode() returns different values

前端 未结 2 763
甜味超标
甜味超标 2021-02-12 06:02

Why is GetHashCode() returning a different value for the same string? I can\'t describe how to duplicate this, but trust that this is not a practical joke and that the two follo

2条回答
  •  醉话见心
    2021-02-12 06:42

    Is it possible that you copied this string from somewhere?

    I had the same problem. I copied the value ans somehow the BOM header is invisible on the first position.

    Try checking the length and you see already a difference. Also you could check byte-by-byte.

提交回复
热议问题