Guest User

Untitled

a guest
Dec 15th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace ConsoleApplication1
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. List<Guid> guids = new List<Guid>();
  11. int count = 0;
  12. while(true)
  13. {
  14. count++;
  15. Guid temp = Guid.NewGuid();
  16. if(guids.Contains(temp))
  17. {
  18. Console.Out.WriteLine("Duplicate Guid Found");
  19. Console.Out.WriteLine("Created " + count + " Guids");
  20. continue;
  21. }
  22. guids.Add(temp);
  23. Console.Out.WriteLine("Created "+count+" Guids");
  24.  
  25. }
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment