Method Replace
Replace(String, String, String, StringComparison)
An overload for System.String.Replace(System.String,System.String) which allows manually specifying the System.StringComparison to use when locating the searchValue within value.
Declaration
public static string Replace(this string value, string searchValue, string newValue, StringComparison stringComparison)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | value | The value to replace the substring in. |
| System.String | searchValue | The substring to be replaced. |
| System.String | newValue | The new substring to use. |
| System.StringComparison | stringComparison | A value from the System.StringComparison enum specifying how strings should be compared when searching for the |
Returns
| Type | Description |
|---|---|
| System.String | A System.String containing the replaced parts. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown if |