Mono Class Library: System.Text.StringBuilder Overview | MembersSystem.Text.StringBuilder.Replace Method |
Replaces all instances of a specified string in a specified range with another specified string. [Edit]
|
- oldValue
- A string containing the string value to replace. [Edit]
- newValue
- A string containing the string value with which to replace oldValue. Can be a null reference. [Edit]
- startIndex
- A int containing the location from which to start replacing oldValue. [Edit]
- count
- A int containing the length of the range in which to replace oldValue. [Edit]
The current instance after substitution has occurred. [Edit]
Type Reason ArgumentNullException oldValue is a null reference. [Edit] ArgumentOutOfRangeException startIndex or count is less than zero.
-or-
The sum of startIndex and count is greater than the length of the current instance.
[Edit]ArgumentException The length of oldvalue is zero. [Edit]
This method substitutes each occurrence of oldValue in the specified range of the current instance with newValue.
Note: If newValue is null , instances of oldValue are removed.This method is case-sensitive.
[Edit]
Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0