if i have a string, e.g "hello", how can i do in c# that it will be copy to the clipboard, so next time i'll do ctrl+v i'll get "hello"?
+3
A:
First google result for 'clipboard C#':
http://www.geekpedia.com/tutorial188_Clipboard-Copy-and-Paste-with-Csharp.html
First line of code in said article:
Clipboard.SetText(txtClipboard.Text);
Kieren Johnstone
2010-08-23 08:59:28
beat me to it! +1 The Clipboard class is in `System.Windows.Forms`
Matt Ellen
2010-08-23 09:00:32
i added the namespace, but i still don't see the Clipboard class. maybe it's because i am usintg console application?
2010-08-23 09:20:41
yes it is! tanks!
2010-08-23 09:25:59
+1
A:
Clipboard.SetText("hello");
You'll need to use the System.Windows.Forms or System.Windows namespaces for that.
Bradley Smith
2010-08-23 09:00:09