GUID 你得到类似 aaaef973-d8ce-4c92-95b4-3635bb2d42d5 的东西
总是一样吗?它是否总是具有以下格式
8个字符“-”、4个字符“-”、4个字符“-”、4个字符“-”、12个字符
我问是因为我需要将不带“-”的 GUID 转换为带“-”的 GUID 和副签证。
最佳答案
没有;还有其他格式,例如您列出的格式,但大括号除外。还有更复杂的格式。以下是 MSDN 列出的一些格式:
UUID formats
- 32 digits:
00000000000000000000000000000000
(N)- 32 digits separated by hyphens:
00000000-0000-0000-0000-000000000000
(D)- 32 digits separated by hyphens, enclosed in braces:
{00000000-0000-0000-0000-000000000000}
(B)- 32 digits separated by hyphens, enclosed in parentheses:
(00000000-0000-0000-0000-000000000000)
(P)- Four hexadecimal values enclosed in braces, where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:
{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
(X)—MSDN
关于c# - GUID 的格式是否始终相同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7775439/