As GUID generation is time-dependent, if System.Guid.NewGuid() is called multiple times at the exact same instant on different threads, could it return identical GUIDs?
On Windows, GUIDs (UUIDs) are created from a cryptographic random number generator with UuidCreate. They are version 4 UUIDs in terms of RFC 4122. No timestamps or ethernet cards are involved, unless you're using old school version 1 GUIDs created with UuidCreateSequential.
See also How Random is System.Guid.NewGuid()? (Take two)
No, there is a serial number inside it that changes for each call, so multiple simultaneous calls on different threads on the same system will not create duplicate Guids.
That does not mean that there is a visible part of the Guid that you can see increments for each call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With