Which part of a GUID is most worth keeping?

前端 未结 5 868
情话喂你
情话喂你 2020-12-15 23:06

I need to generate a unique ID and was considering Guid.NewGuid to do this, which generates something of the form:

0fe66778-c4a8-4f93-9bda-36622         


        
5条回答
  •  孤城傲影
    2020-12-15 23:35

    Keep all of it.

    From the above link:

    * Four bits to encode the computer number,
    * 56 bits for the timestamp, and
    * four bits as a uniquifier.
    

    you can redefine the Guid to right-size it to your needs.

提交回复
热议问题