TextSelection.ReplaceText(String, String, Int32) Method

Definition

Microsoft Internal Use Only. This API has been deprecated in VS 2022 and above. Please refer the breaking API changes in VS 2022 for guidance on how to migrate API usage via modern find and repalce APIs.

bool ReplaceText(std::wstring const & Pattern, std::wstring const & Replace, int vsFindOptionsValue = 0);
[System.Runtime.InteropServices.DispId(71)]
[System.Runtime.InteropServices.TypeLibFunc(64)]
public bool ReplaceText (string Pattern, string Replace, int vsFindOptionsValue = 0);
[System.Runtime.InteropServices.DispId(71)]
public bool ReplaceText (string Pattern, string Replace, int vsFindOptionsValue = 0);
[<System.Runtime.InteropServices.DispId(71)>]
[<System.Runtime.InteropServices.TypeLibFunc(64)>]
abstract member ReplaceText : string * string * int -> bool
[<System.Runtime.InteropServices.DispId(71)>]
abstract member ReplaceText : string * string * int -> bool
Public Function ReplaceText (Pattern As String, Replace As String, Optional vsFindOptionsValue As Integer = 0) As Boolean

Parameters

Pattern
String

The pattern to find.

Replace
String

The string with which to replace the found text.

vsFindOptionsValue
Int32

The find flags.

Returns

true if the text was replaced, otherwise false.

Attributes

Applies to