Mega Code Archive

 
Categories / C# / Data Types
 

Replaces the specified string to replace

using System; using System.Collections.Specialized; using System.Xml; using System.Text; using System.Text.RegularExpressions; namespace RSBuild {   /// <summary>   /// Utility methods.   /// </summary>   public static class Util   {         /// <summary>         /// Replaces the specified string to replace.         /// </summary>         /// <param name="stringToReplace">The string to replace.</param>         /// <param name="oldValue">The old value.</param>         /// <param name="newValue">The new value.</param>         /// <returns></returns>     public static string Replace(string stringToReplace, string oldValue, string newValue)     {       return Regex.Replace(stringToReplace, oldValue, newValue, RegexOptions.IgnoreCase | RegexOptions.Compiled);     }   } }