StringReplace Method (Char, Char) |
Returns a new string in which all occurrences of a specified Unicode character in this instance are replaced with another specified Unicode character.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public string Replace(
char oldChar,
char newChar
)
Parameters
- oldChar
- Type: SystemChar
The Unicode character to be replaced. - newChar
- Type: SystemChar
The Unicode character to replace all occurrences of oldChar.
Return Value
Type:
StringA string that is equivalent to this instance except that all instances of
oldChar are replaced with
newChar.
See Also