Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    \$\begingroup\$ System.Windows.Clipboard \$\endgroup\$ Commented Feb 27, 2017 at 11:23
  • 4
    \$\begingroup\$ Also, Clipboard.Clear() is already a function, so the lambda can be dropped. \$\endgroup\$ Commented Feb 27, 2017 at 11:30
  • 1
    \$\begingroup\$ I won't bother adding an answer for LINQPad since this answer would just run in it. System.Windows.Clipboard.Clear(); But, lprun might be a more lightweight way to run this answer than VS or even VS Code. \$\endgroup\$ Commented Feb 27, 2017 at 23:52
  • \$\begingroup\$ @Nat When omitting .Forms, it didn't compile on Linux and I don't have a Windows machine at the moment. \$\endgroup\$ Commented Feb 28, 2017 at 7:48
  • 2
    \$\begingroup\$ @adrianmp that class is only contained in PresentationCore.dll, a reference added by default on WPF type projects. I have no idea if that dll is included in Mono/.NET Core \$\endgroup\$ Commented Feb 28, 2017 at 16:54