So you may wonder how to get a return value from a function that requires you to Invoke(). It’s actually quite simple. You’ll need another delegate type, here is an example of returning the key of a tabControls selected tab: public string CurrentTabKey() { if (tabControl.InvokeRequired) { return (string)tabControl.Invoke( new Func<String>(() => CurrentTabKey()) ); } …
Trending Articles
More Pages to Explore .....