title: Generate a unique identifier string with Visual Studio 2012
body: <p>I am creating a program with VS2012 that I need to generate a unique identification string.  I would like to be able to actually see the string and know some things about it:</p>
  <ol>
  <li>whether it was created in the AM or PM</li>
  <li>the month it was created</li>
  <li>the day it was created</li>
  <li>the hour it was created</li>
  <li>the minute it was created</li>
  </ol>
  <p>All of the above is VERY EASY for me:</p>
  <pre><code>Private Function GenIdentifier() As String
      
      GenIdentifier = Nothing
  
      Dim Part1 As String = IIf(Format(Now, &quot;ttttt&quot;) = &quot;AM&quot;, &quot;A&quot;, &quot;P&quot;)
      Dim Part2 As String = Format(Now, &quot;MM&quot;)
      Dim Part3 As String = Format(Now, &quot;dd&quot;)
      Dim Part4 As String = Format(Now, &quot;hh&quot;)
      Dim Part5 As String = Format(Now, &quot;mm&quot;)
  
      GenIdentifier = Part1 &amp; Part2 &amp; Part3 &amp; Part4 &amp; Part5
  
   End Function
  </code></pre>
  <p>The part I am having trouble with is that I am repeatedly calling this function.  I need to &quot;add&quot; to this another field that makes this string unique each time it is called.  What is the best way to do this?</p>