SamKr
6/13/2019 - 8:18 AM

Invoke with Return Value

Invoke a method (if GUI hook is required) and get its return value

if (object.InvokeRequired) return (bool)object.Invoke(new Func<bool>(() => FunctionName(optionalParameter)));