Performs advanced string replace (including StringComparison for case insensitive or invariant culture replace).

Namespace: MonoSoftware.Core
Assembly: MonoSoftware.Core (in MonoSoftware.Core.dll) Version: 1.0.40.669 (1.0.40.669)

Syntax

C#
public static string Replace(
	this string value,
	string oldValue,
	string newValue,
	StringComparison comparisonType
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function Replace ( 
	value As String,
	oldValue As String,
	newValue As String,
	comparisonType As StringComparison
) As String
Visual C++
public:
[ExtensionAttribute]
static String^ Replace(
	String^ value, 
	String^ oldValue, 
	String^ newValue, 
	StringComparison comparisonType
)
F#
static member Replace : 
        value : string * 
        oldValue : string * 
        newValue : string * 
        comparisonType : StringComparison -> string 

Parameters

value
Type: System..::..String
original string
oldValue
Type: System..::..String
string to replace
newValue
Type: System..::..String
replaced string
comparisonType
Type: System..::..StringComparison
Comparation type

Return Value

Type: String
Replaced string

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also