Skip to main content
.NET Framework Class Library
String..::.Replace Method





Returns a new string in which all occurrences of a specified Unicode character or String in the current string are replaced with another specified Unicode character or String.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
 NameDescription
Public methodReplace(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.
Public methodReplace(String, String)Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.
Top
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?