Posted on: 3/17/2015 9:06:06 PM | Views : 661

I have a a problem in my C# code. I keep getting an error "An item with the same key has already been added" and I tried various things suggested on the net, but I can't seem to get rid of it. Can someone please help.
I get the error on this line:
productUpdateDictionary.Add(products[i].code, new ProductUpdate { Index = i, ProductCode = products[i].code }); below is the part of the code that involves this.

private class ProductUpdate { public int Index = 0; public string ProductCode; public bool UpdatedProductDetail = false; public bool UpdatedPrice = false; public bool UpdatedWorkflow = false; } private void UpdateProductList( List<string> account, string userEmail, List<Product> products ) { Dic ...

Go to the complete details ...