using System.Windows; static void Main(string[] args) { string textData = "I want to put this string on the clipboard."; Clipboard.SetData(DataFormats.Text, (Object)textData); if (Clipboard.ContainsData(DataFormats.Text)) { Console.WriteLine(Clipboard.GetText()); } }