Click or drag to resize
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: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
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: String
A string that is equivalent to this instance except that all instances of oldChar are replaced with newChar.
See Also