I want to update the UI from another class in non-UI thread.
But I can not call "BeginInvoke" in Test class directly.
How to solve it...
private void Form1_Load(object sender, EventArgs e)
{
Task.Run(() =>
{
Test.Set(textBox1);
});
}
public class Test
{
public static void Set(TextBox textBox)
{
// ↓Exception...
textBox.Text = "ABCD";
}
}