Copy empty string using Clipboard.SetText(string)

前端 未结 4 1308
感情败类
感情败类 2020-12-20 18:33

Clipboard.SetText(\"\") throws me an error - \"Value cannot be null\". So how do I copy an empty string using Clipboard.SetText?

I have alr

4条回答
  •  再見小時候
    2020-12-20 19:23

    See Clipboard.Clear Method (System.Windows.Forms) (MSDN).

    Clipboard.Clear();
    

    will clear the clipboard, so you will "paste" an empty string.

提交回复
热议问题