I was just curious about this: the following code will not compile, because we cannot modify a foreach iteration variable:
foreach (var item in MyObj
Use for loop instead of foreach loop and assign value. it will work
foreach (var a in FixValue) { for (int i = 0; i < str.Count(); i++) { if (a.Value.Contains(str[i])) str[i] = a.Key; } }