c# - 具有始终相等编号的 GUID

标签 c# guid

<分区>

为什么在这台计算机生成的每个 GUID 中间,我们都能看到一个 4?

enter image description here

最佳答案

它是 GUID 算法 version(在你的例子中是 4):

https://en.wikipedia.org/wiki/Universally_unique_identifier

In its canonical textual representation, the sixteen octets of a UUID are represented as 32 hexadecimal (base 16) digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 alphanumeric characters and four hyphens). For example:

123e4567-e89b-12d3-a456-426655440000
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

The four bits of digit M indicate the UUID version, and the one to three most significant bits of digit N indicate the UUID variant. In the example, M is 1 and N is a (10xx), meaning that the UUID is a variant 1, version 1 UUID; that is, a time-based DCE/RFC 4122 UUID.

关于c# - 具有始终相等编号的 GUID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46049976/

相关文章:

c# - ASP.NET 中的 MySQL 异常

c# - WCF 不反序列化值类型。神秘行为

c# - 如何创建一个全零元素的 Guid?

mysql - 从文本/url 快速生成数字 id "SELECT"

c# - 等效 new Guid() 和 Guid.Empty 的目的

EventHandler 创建的 C# Windows 窗体立即消失

c# - 可以在 C# 中使用数组 ['Name' ] 访问的数组

c# - 在iis服务器上从web api运行exe文件不起作用

c# - 由该代码生成的 ID 的安全性如何?

c# - 从 GUID 的前四个字节获取 Int32 的最佳方法是什么?