-4

I want to save a string to "copy" memory in computer (ctrl + c), after clicking a button. how can I save that string to the computer memory (ctrl c) in c#?

1 Answers1

0

Reference System.Windows.Forms if it is not already referenced in the project. Then do the magic anywhere you need:

System.Windows.Forms.Clipboard.SetText("your string");
Diligent Key Presser
  • 4,183
  • 4
  • 26
  • 34