Partager via


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

'Declaration
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: String

    The text to use as a replacement.

Return Value

Type: Boolean
true if the edit succeeded, otherwise false.

Exceptions

Exception Condition
ArgumentNullException

text is nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

IEditorOperations Interface

Microsoft.VisualStudio.Text.Operations Namespace