Last post Dec 12, 2015 01:59 AM by bobj181
Dec 11, 2015 11:03 PM|urpalshu|LINK
Is there a better way in writing this foreach code. May be by using Parallel.Foreach?
foreach (MappingValue item in value.Maps)
foreach (KeyValuePair<string, string> source in item.Mappings)
ValueId = item.Id,
Value = item.Value,
Name = item.Name
Dec 12, 2015 01:59 AM|bobj181|LINK
The For Each available from the Parallel space is pretty much the same, with the exception that each iteration is spun off as it's own process to complete. With the embedded For Each that you are using, it might cause issues with order of sequence (if that
Not know the exact requirements that you have, the For Each statement looks good.