GUID的格式是否始终相同? [英] Is the format of GUID always the same?

查看:91
本文介绍了GUID的格式是否始终相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GUID,您会得到类似aaaef973-d8ce-4c92-95b4-3635bb2d42d5

GUID you get something like aaaef973-d8ce-4c92-95b4-3635bb2d42d5

是否总是一样?是否总是会采用以下格式

Is it always the same? Is it always going to have the following format

8个字符-",4个字符-",4个字符-",4个字符-",12个字符

8 char "-", 4 char "-", 4 char "-", 4 char "-", 12 char

我问是因为我需要将不带-"的GUID转换为带有-"和副签证的GUID.

I'm asking because i need to convert a GUID without "-" to GUID with "-" and vice visa.

推荐答案

否;还有其他格式,例如您列出的格式(带花括号除外).还有更复杂的格式.这是MSDN列出的一些格式:

No; there are other formats, such as the format you listed except with braces. There's also more complex formats. Here are some of the formats MSDN lists:

UUID格式

  • 32位数字:00000000000000000000000000000000(N)
  • 由连字符分隔的32位数字:00000000-0000-0000-0000-000000000000(D)
  • 用连字符隔开的32位数字,用大括号括起来:{00000000-0000-0000-0000-000000000000}(B)
  • 用连字符分隔的32位数字,并用括号括起来:(00000000-0000-0000-0000-000000000000)(P)
  • 用大括号括起来的四个十六进制值,其中第四个值是也用大括号括起来的八个十六进制值的子集:{0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}(X)

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

这篇关于GUID的格式是否始终相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆