Occasionally when I generate a GUID using visual studio, the 14th hex character is lowercase while the rest of the hex digits are uppercase.
有时,当我使用visual studio生成GUID时,第14个十六进制字符为小写,而其余十六进制数字为大写。
Cause a bit of problem when comparing the string representations of two GUIDs. Now I always compare the binary equivalents to be safe.
比较两个GUID的字符串表示时会引起一些问题。现在我总是比较二进制等价物是安全的。
1 个解决方案
#1
Yes, this is a known bug. But you shouldn't be making string comparisons; use Guid.Equals
instead.
是的,这是一个已知的错误。但你不应该进行字符串比较;请改用Guid.Equals。
#1
Yes, this is a known bug. But you shouldn't be making string comparisons; use Guid.Equals
instead.
是的,这是一个已知的错误。但你不应该进行字符串比较;请改用Guid.Equals。