Is a GUID unique 100% of the time?

前端 未结 22 2553
孤独总比滥情好
孤独总比滥情好 2020-11-22 01:31

Is a GUID unique 100% of the time?

Will it stay unique over multiple threads?

22条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 02:15

    If you are scared of the same GUID values then put two of them next to each other.

    Guid.NewGuid().ToString() + Guid.NewGuid().ToString();
    

    If you are too paranoid then put three.

提交回复
热议问题