[STAThread]
static void Main(string[] args)
{
DoThing().Wait();
}
static async Task DoThing()
{
Clipboard.SetText("hi");
}
I added [STAThread] in the first place bc I got this error
ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made
But I am still getting the same error.
Clipboard is from System.Windows.Forms.
How do I set the clipboard from that async method?