Two ways to do a case insensitive string replace without using RegEx (which often is not a solution).
- Roll your own based on Fastest C# Case Insenstive String Replace – CodeProject (which works as of Visual Studio 2002 / .NET 1.0, as that introduced the StringBuilder class).
- Reuse the VB.NET built-in Replace Function (Visual Basic) which works at least as of Visual Studio 2003 (.NET 1.1) and probably in Visual Studio 2002 (.NET 1.0, which I don’t have any more)
Thanks User Tim Schmelter for pointing me at those.
–jeroen
via: Is there a case insensitive string replace in .Net without using Regex? – Stack Overflow.