Monday, June 10, 2013

Cross Threaded Invoke of typed method

private string MyMethod(string inString)
{
   if (this.InvokeRequired)
      return (string)this.Invoke(new MethodInvoker(() => MyMethod(inString)));
   else
   {
      string result = "";
      // working code of MyMethod
      return result;
   }
}

No comments:

Post a Comment