c# System.InvalidOperationException thread code example
Example: invalidoperationexception c# ui thread
this.Invoke(new Action(() =>
{
// UI operation here
}));
this.Invoke(new Action(() =>
{
// UI operation here
}));