public void DoWork(string str) { if (this.InvokeRequired) { MyDelegateMethod theDelegateMethod = new MyDelegateMethod(this.DoWork); this.Invoke(theDelegateMethod, new object[] { str }); } }
internal static void MyMethod(string name, MyDelegateMethod method) { method(name); }