The following code:
var ui = TaskScheduler.FromCurrentSynchronizationContext();
Task.Factory.StartNew(() => { listBox1.Items.Add("Starting to crawl " + srMainSiteURL + "..."); } , ui);
Delegate 'System.Action<object>' does not take 0 arguments
Because you did use
public Task StartNew(Action<object> action, object state)
I do think you wanted to use
public Task StartNew(Action action, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
So your example would become:
Task.Factory.StartNew(() => { listBox1.Items.Add("Starting to crawl " + srMainSiteURL + "..."); }, CancellationToken.None, TaskCreationOptions.None, ui);