I want to run this normal loop in Parallel using Parallel.For or Parallel.ForEach<>
foreach (KeyValuePair<String, String> symbol in symbolsConfigured){..}
I’ve been using elsewhere like this –
Parallel.ForEach(sig.Products, dbp =>
{...}
But I can’t think of how to write this.
You do it exactly the same way:
The compiler will infer the callback’s parameter type, just like any other call.