Niklas Niklas - 1 year ago 145
C# Question

What are the chances to get a Guid.NewGuid () duplicate?

Possible Duplicate:

Is a GUID unique 100% of the time?

Simple proof that GUID is not unique

In MSDN you can read:

The chance that the value of the new Guid will be all zeros or equal to any other Guid is very low.

Say that you have an method that will create a file every second, and you use the method
for filename, is it possible to get the same Guid then? Or will the local computer keep track in some way? How low is the chance ?

Answer Source

You would never run out of guids. The likelihood of duplicating them is VERY low:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download