问题
When I try to create GUIDs like this
Guid guid1 = Guid.Parse("aaaaaaaa-bbbb-cccc-eeee-ffffffffffff");
Guid guid2 = Guid.Parse("AAAAAAAA-BBBB-CCCC-EEEE-FFFFFFFFFFFF");
Both are creating same GUID object. Is it possible to create unique GUIDs for lower case and upper case version of same string?
Any ideas are welcome.
回答1:
GUIDs are actually bytes parsed from hexadecimal.
That is not possible.
You should not use GUIDs to store arbitrary data.
回答2:
Your strings are hexadecimal representations of the same value because hexadecimal is not case sensitive.
Your request is like saying that you don't want 0.5
to equal 1 / 2
. They are different representations of the same value.
Perhaps you need a different method of generating GUIDs.
来源:https://stackoverflow.com/questions/17048282/creating-different-guid-for-same-lowercase-and-upper-case-strings