IEditorOperations.ReplaceSelection Method
Replaces the text selection with the specified text.
Namespace: Microsoft.VisualStudio.Text.Operations
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaración
Function ReplaceSelection ( _
text As String _
) As Boolean
bool ReplaceSelection(
string text
)
bool ReplaceSelection(
String^ text
)
abstract ReplaceSelection :
text:string -> bool
function ReplaceSelection(
text : String
) : boolean
Parameters
- text
Type: System.String
The text to use as a replacement.
Return Value
Type: System.Boolean
true if the edit succeeded, otherwise false.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | text is nulla null reference (Nothing in Visual Basic). |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.