NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StringBuilder.Replace (String, String)

A StringBuilder with all instances of a specified character string replaced with a new character string.

[Visual Basic]
Overloads Public Function Replace( _
   ByVal oldValue As String, _
   ByVal newValue As String _
) As StringBuilder
[C#]
public StringBuilder Replace(
   string oldValue,
   string newValue
);
[C++]
public: StringBuilder* Replace(
   String* oldValue,
   String* newValue
);
[JScript]
public function Replace(
   oldValue : String,
   newValue : String
) : StringBuilder;

Parameters

oldValue
The string to replace.
newValue
The string with which to replace oldValue.

Return Value

A reference to the current StringBuilder with all instances of oldValue replaced with newValue.

Exceptions

Exception Type Condition
ArgumentNullException if oldValue is a null reference (in Visual Basic Nothing).

Remarks

The strings to be replaced are checked on an ordinal basis (e.g. not locale aware). If newValue is null, instances of oldValue are removed (e.g. replaced with nothing.). This method is case-sensitive.

See Also

StringBuilder Class | StringBuilder Members | System.Text Namespace | StringBuilder.Replace Overload List