xxxxxxxxxx
if(textBox1.SelectionLength>0)
{
textBox1.Copy();
}
how to copy text c#
xxxxxxxxxx
//first insert the <UseWindowsForms>true</UseWindowsForms> in here
<TargetFramework>net*.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
//Afterwards insert - using System.Windows.Forms into your program
xxxxxxxxxx
//Now you can use the Clipboard class:
Clipboard.SetText("huh");//set text to clip board - basically Ctrl+C
string copiedText = Clipboard.GetText();
//get text to clip board - basically Ctrl+V