I am getting index out of range error if i run below code 

```
var list=new list<PriceDetails>();
Parallel.ForEach(productResults.Items, productPrices =>
{
    var  priceDetail=new PriceDetails { price=productPrices.prices.firstordefault();}
    list.add(priceDetail);
}

```

Please provide an example which solves above problem-using concurrent?