I can reproduce the problem with your code in the .NET Profile Client, but when switching to .NET 4 or 4.5 it works as expected.
However, the ClipBoard.GetText() manual says:
Use the ContainsText method to determine if the clipboard contains text data before retrieving it using this method.
I accept this as an instruction, not a suggestion, so try the following:
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.Clear(); while (!Clipboard.ContainsText()) Thread.Sleep(90); } }
It shows the copied text, although I must say that it allows my system to get corrupted when I copy the text.
Codecaster
source share