As the replace method has inside a search its missing a StringComparison option parameter. Actually I had to replace all the String.Replace calls to Regex.Replace methods because I couldn't set the search option to StringComparison.CurrentCultureIgnoreCase