TextSelection.Insert (Método)

Inserta la cadena dada en el punto de inserción actual.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

'Declaración
Sub Insert ( _
    Text As String, _
    vsInsertFlagsCollapseToEndValue As Integer _
)
void Insert(
    string Text,
    int vsInsertFlagsCollapseToEndValue
)
void Insert(
    [InAttribute] String^ Text, 
    [InAttribute] int vsInsertFlagsCollapseToEndValue
)
abstract Insert : 
        Text:string * 
        vsInsertFlagsCollapseToEndValue:int -> unit
function Insert(
    Text : String, 
    vsInsertFlagsCollapseToEndValue : int
)

Parámetros

  • Text
    Tipo: String

    Texto que se va a insertar.

  • vsInsertFlagsCollapseToEndValue
    Tipo: Int32

    Uno de los valores de vsInsertFlags que indican cómo se insertará el texto.

Ejemplos

[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

Seguridad de .NET Framework

Vea también

Referencia

TextSelection Interfaz

EnvDTE (Espacio de nombres)