title: Is it a bug in Visual Studio 2012 or I am doing something wrong?
body: <p>I'm writing small program of generating 30000 distinct alphanumeric codes and I want the program to print the count of already generated codes every time it is divisible by 1000.
  When I run it it does not print it like </p>
  
  <pre><code>1000
  2000
  3000
  </code></pre>
  
  <p>and so on. Instead it prints it like this
  <img src="https://i.stack.imgur.com/dZ2f9.png" alt=""></p>
  
  <p>It does not happen when I step into and go step by step.
  The following is the code</p>
  
  <pre><code>static void Main(string[] args)
      {
          char[] charSequence = { '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y' };
  
          Console.WriteLine(charSequence.Length);
          HashSet&lt;string&gt; set = new HashSet&lt;string&gt;();
          while (set.Count &lt; 30000)
          {
              CodeGenerator cg = new CodeGenerator();
              Random rnd = new Random();
              string code = "";
              for (int i = 0; i &lt; 8; i++)
              {
                  int charSequenceNumber = rnd.Next(charSequence.Length);
                  code += charSequence[charSequenceNumber];
              }
              set.Add(code);
              if (set.Count % 1000 == 0)
              {
                  Console.WriteLine(set.Count);
              }
  
          }
         Console.WriteLine();
          Console.ReadLine();
      }
  </code></pre>
  
  <p>Am I doing something wrong?</p>