Last active
December 17, 2018 14:57
-
-
Save Razzo78/b447296360820e0f1d08f1f09bed9244 to your computer and use it in GitHub Desktop.
C# - Update UI control thread-safe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ControlInvokeRequired(Control control, Action action) | |
{ | |
if (control.InvokeRequired) control.Invoke(new MethodInvoker(delegate { action(); })); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment