Bridge

String..::..Replace Method (String, String)

Returns a new string in which all occurrences of a specified string in the current instance are replaced with another specified string.

Namespace:  System
Assembly:  Bridge (in Bridge.dll)

Syntax


[TemplateAttribute]
public string Replace(
	string substr,
	string newSubStr
)
<TemplateAttribute> _
Public Function Replace ( _
	substr As String, _
	newSubStr As String _
) As String
[TemplateAttribute]
public:
String^ Replace(
	String^ substr, 
	String^ newSubStr
)

Parameters

substr
Type: System..::..String
newSubStr
Type: System..::..String

Return Value

A string that is equivalent to the current string except that all instances of oldValue are replaced with newValue. If oldValue is not found in the current instance, the method returns the current instance unchanged.

Exceptions


ExceptionCondition
System..::..ArgumentNullExceptionoldValue is null.
System..::..ArgumentExceptionoldValue is the empty string ("").