Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the 14th character in a GUID generated by Visual Studio sometimes lowercase

Occasionally when I generate a GUID using visual studio, the 14th hex character is lowercase while the rest of the hex digits are uppercase.

Cause a bit of problem when comparing the string representations of two GUIDs. Now I always compare the binary equivalents to be safe.

like image 403
Kevin Newman Avatar asked Dec 17 '22 08:12

Kevin Newman


1 Answers

Yes, this is a known bug. But you shouldn't be making string comparisons; use Guid.Equals instead.

like image 100
John Feminella Avatar answered Apr 26 '23 17:04

John Feminella