Freigeben über


TextSelection.NewLine-Methode

Fügt ein Zeilenumbruchzeichen am aktiven Punkt ein.

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

Syntax

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

Parameter

  • Count
    Typ: Int32

    Optional. Stellt die Anzahl der einzufügenden Zeilenumbruchzeichen dar.

Hinweise

Wenn der Wert von Count negativ bzw. größer oder gleich 10.000 ist, schlägt NewLine fehl.

Beispiele

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

.NET Framework-Sicherheit

Siehe auch

Referenz

TextSelection Schnittstelle

EnvDTE-Namespace