I am using the below code
var processed = new List(); Parallel.ForEach(items, item => { processed.Add(SomeProcessingFunc(item)); });
Using ConcurrentBag of type Something
var bag = new ConcurrentBag>; var items = GetAllItemsINeed(); Parallel.For(items,i => { bag.Add(i.DoSomethingInEachI()); });