The following code:
var ui = TaskScheduler.FromCurrentSynchronizationContext();
Task.Factory.StartNew(() => { listBox1.Items.Add("Starting to crawl " + srMainSiteURL + "..."); } , ui);
is resulting in the following error:
Delegate 'System.Action<object>' does not take 0 arguments
After looking at other threads, I have not been able to determine nor understand the cause of the error. Please advise.
Because you did use
I do think you wanted to use
So your example would become: