TextSelection.NewLine, méthode

Insère un saut de ligne au point actif.

Espace de noms :  EnvDTE
Assembly :  EnvDTE (dans EnvDTE.dll)

Syntaxe

'Déclaration
Sub NewLine ( _
    Count As Integer _
)
void NewLine(
    int Count
)
void NewLine(
    [InAttribute] int Count
)
abstract NewLine : 
        Count:int -> unit
function NewLine(
    Count : int
)

Paramètres

  • Count
    Type : Int32

    Optionnel. Représente le nombre de caractères de saut de ligne à insérer.

Notes

Si la valeur de Count est négative ou supérieure ou égale à 10 000, NewLine échoue.

Exemples

Sub NewLineExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Go to 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

Sécurité .NET Framework

Voir aussi

Référence

TextSelection Interface

EnvDTE, espace de noms