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.

Edit
Report