simple proof that GUID is not unique

Posted by Kai on Stack Overflow See other posts from Stack Overflow or by Kai
Published on 2009-11-10T00:55:24Z Indexed on 2010/05/20 17:00 UTC
Read the original article Hit count: 219

Filed under:
|
|

I'd like to prove that a GUID is not unique in a simple test program. I expected this to run for hours but it's not working. How can I make it work?

BigInteger begin = new BigInteger((long)0);
BigInteger end = new BigInteger("340282366920938463463374607431768211456",10);  //2^128
for(begin; begin<end; begin++)
  Console.WriteLine(System.Guid.NewGuid().ToString());

I'm using C#

© Stack Overflow or respective owner

Related posts about guid

Related posts about c#