Creating UIDs in C#
Everytime you want to create a UniqueID, don’t bother with hashing or using a random number generator… Instead, use the System.Guid.NewGuid() function to generate a 128-bit integer. Read more about using the GUID creation function, with examples.