TextSelection.NewLine(Int32) Methode

Definition

Fügt am aktiven Punkt einen Zeilenumbruch ein.

void NewLine(int Count = 1);
[System.Runtime.InteropServices.DispId(41)]
public void NewLine (int Count = 1);
[<System.Runtime.InteropServices.DispId(41)>]
abstract member NewLine : int -> unit
Public Sub NewLine (Optional Count As Integer = 1)

Parameter

Count
Int32

(Optional) Stellt die Anzahl der einzufügenden Zeilenumbrüche dar.

Attribute

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  

Hinweise

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

Gilt für