Metodo TextSelection.NewLine

Inserisce un carattere di interruzione di riga nel punto attivo.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

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

Parametri

  • Count
    Tipo: System.Int32
    Facoltativo.Rappresenta il numero di caratteri di nuova riga da inserire.

Note

Se il valore di Count è negativo oppure è maggiore o uguale a 10.000, il metodo NewLine ha esito negativo.

Esempi

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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

TextSelection Interfaccia

Spazio dei nomi EnvDTE