Thread safe way to update UI elements in C#

//declare the delegate delegate void SetControlValueCallback(Control oControl, string propName, object propValue);   // the function that sets properties on the UI control private void SetControlPropertyValue(Control oControl, string propName, object propValue) { if (oControl.InvokeRequired) { SetControlValueCallback d = new SetControlValueCallback(SetControlPropertyValue); oControl.Invoke(d, new object[] { oControl, propName, propValue }); } else { Type t = oControl.GetType(); System.Reflection.PropertyInfo[] […]