How to generate 8 bytes unique id from GUID?

后端 未结 10 1675
长情又很酷
长情又很酷 2020-12-04 01:21

I try to use long as unique id within our C# application (not global, and only for one session) for our events. Do you know if the following will generate an unique long id?

10条回答
  •  我在风中等你
    2020-12-04 02:20

    Yes, this will be most likely unique but since the number of bits are less than GUID, the chance of duplicate is more than a GUID - although still negligible.

    Anyway, GUID itself does not guarantee uniqueness.

提交回复
热议问题