Answers for "c# copy string to clipboard console application"

C#
1

c# put string to clipboard

using System.Windows.Forms; //required

Clipboard.SetText("your string");

//FOR .NET CORE
Install-Package TextCopy

TextCopy.ClipboardService.SetText("Text to place in clipboard");
Posted by: Guest on August-03-2021
0

c# paste from clipboard

// Paste text from the clipboard.
private void btnPaste_Click(object sender, EventArgs e)
{
    txtPaste.Text = Clipboard.GetText();
}

// Copy text to the clipboard.
private void btnCopy_Click(object sender, EventArgs e)
{
    Clipboard.SetText(txtCopy.Text);
}
Posted by: Guest on September-03-2021

Code answers related to "c# copy string to clipboard console application"

C# Answers by Framework

Browse Popular Code Answers by Language