How does C# generate GUIDs?

后端 未结 8 1257
北荒
北荒 2020-12-17 07:38

How are GUIDs generated in C#?

8条回答
  •  死守一世寂寞
    2020-12-17 08:28

    Details on Wikipedia and MSDN.

    In short, a GUID is a random 128-bit integer, but we format them using hex digits so that they are easily readable (this is the 8-4-4-4-12 format that you see). As far as how its generated, see the linked Wikipedia article.

提交回复
热议问题