Sdílet prostřednictvím


TextSelection.Insert-Methode

Aktualisiert: November 2007

Fügt die angegebene Zeichenfolge an der aktuellen Einfügemarke ein.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
Sub Insert ( _
    Text As String, _
    vsInsertFlagsCollapseToEndValue As Integer _
)
'Usage
Dim instance As TextSelection
Dim Text As String
Dim vsInsertFlagsCollapseToEndValue As Integer

instance.Insert(Text, vsInsertFlagsCollapseToEndValue)
void Insert(
    string Text,
    int vsInsertFlagsCollapseToEndValue
)
void Insert(
    [InAttribute] String^ Text, 
    [InAttribute] int vsInsertFlagsCollapseToEndValue
)
function Insert(
    Text : String, 
    vsInsertFlagsCollapseToEndValue : int
)

Parameter

Beispiele

[Visual Basic]

Sub InsertExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to the first line in document and select it.
   objSel.GotoLine(1, True)
   ' Insert some new lines and some text.
   objSel.NewLine(3)
   objSel.Insert("A new line", vsInsertFlags.vsInsertFlagsInsertAtStart)
End Sub

Berechtigungen

Siehe auch

Referenz

TextSelection-Schnittstelle

TextSelection-Member

EnvDTE-Namespace