This is baffling me, maybe somebody can shine the light of education on my ignorance. This is in a C# windows app. I am accessing the contents of a listbox from a thread.
Try this:
private delegate void xThreadCallBack(); private void ThreadCallBack() { if (this.InvokeRequired) { this.BeginInvoke(new xThreadCallBack(ThreadCallBack)); } else { //do what you want } }
Though, the answer with the lambda expression would suffice.