Share via


Replace Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Replaces all occurrences of a specified character or string in this instance with another specified 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

  Name Description
Public method Replace(Char, Char) Replaces all occurrences of a specified character in this instance with another specified character.
Public method Replace(String, String) Replaces all occurrences of a specified string in this instance with another specified string.
Public method Replace(Char, Char, Int32, Int32) Replaces, within a substring of this instance, all occurrences of a specified character with another specified character.
Public method Replace(String, String, Int32, Int32) Replaces, within a substring of this instance, all occurrences of a specified string with another specified string.

Top

See Also

Reference

StringBuilder Class

System.Text Namespace