title: How to generate absolutely unique GUID's?
body: <p>Is there a way to generate every time a 100% new GUID without any chance to collide within entire application?</p>
  
  <p>Since I cannot answer my question in eight hours, I come up with the solution:</p>
  
  <pre><code>internal static class GuidGenerator
  {
      private static readonly HashSet&lt;Guid&gt; _guids = new HashSet&lt;Guid&gt;();
  
      internal static Guid GetOne()
      {
          Guid result;
  
          lock (_guids)
              while (!_guids.Add(result = Guid.NewGuid())) ;
  
          return result;
      }
      internal static void Utilize(Guid guid)
      {
          lock (_guids)
              _guids.Remove(guid);
      }
  }
  </code></pre>
  
  <p>Is this code solves the problem within the app?</p>
  
  <p>EDIT: Uh, its getting complicated. Thread safety kills the speed.</p>