title: Strange behaviour with clipboard in C# console application
body: <p>Consider this small program:</p>
  
  <pre><code>class Program
  {
      [STAThread]
      static void Main(string[] args)
      {
          Console.WriteLine("Please copy something into the clipboard.");
          WaitForClipboardChange();
          Console.WriteLine("You copied " + Clipboard.GetText());
          Console.ReadKey();
      }
  
      static void WaitForClipboardChange()
      {
          Clipboard.SetText("xxPlaceholderxx");
          while (Clipboard.GetText() == "xxPlaceholderxx" &amp;&amp; 
                 Clipboard.GetText().Trim() != "")
              Thread.Sleep(90);
      }
  }
  </code></pre>
  
  <p>I run it, and I copy a string from Notepad. But the program just gets an empty string from the clipboard and writes "You copied ".</p>
  
  <p>What's the problem here? Is there something that makes clipboard access behave weirdly in a console application?</p>
  
  <p>This is Windows 7 SP1 x86, .NET 4 Client Profile.</p>