Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //control: ISynchronizeInvoke
- if (control.InvokeRequired)
- {
- Action d = MethodToExec; //can use Action<T> or Func<T, TResult>
- control.Invoke(d,null); //null are method parameters
- }
- else
- {
- MethodToExec();
- }
Advertisement
Add Comment
Please, Sign In to add comment