Performs advanced string replace (including StringComparison for case insensitive or invariant culture replace).
Namespace: MonoSoftware.CoreAssembly: 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
|
Return Value
Type:
StringReplaced 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