I have a string on which I need to do some replacements. I have a Dictionary where I have search-replace pairs defined. I have created fol
Dictionary
Do this with Linq:
var newstr = dict.Aggregate(str, (current, value) => current.Replace(value.Key, value.Value));
dict is your search-replace pairs defined Dictionary object.
str is your string which you need to do some replacements with.