StringReplace Method (String, String) |
Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string Replace(
string oldValue,
string newValue
)
Parameters
- oldValue
- Type: SystemString
The string to be replaced. - newValue
- Type: SystemString
The string to replace all occurrences of oldValue.
Return Value
Type:
StringA string that is equivalent to the current string except that all instances of
oldValue are replaced with
newValue.
Exceptions See Also