Share via


TextSelection.GotoLine-Methode

Wechselt zum Anfang der angegebenen Zeile und markiert diese ggf.

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

Syntax

'Declaration
Sub GotoLine ( _
    Line As Integer, _
    Select As Boolean _
)
void GotoLine(
    int Line,
    bool Select
)
void GotoLine(
    [InAttribute] int Line, 
    [InAttribute] bool Select
)
abstract GotoLine : 
        Line:int * 
        Select:bool -> unit 
function GotoLine(
    Line : int, 
    Select : boolean
)

Parameter

  • Line
    Typ: System.Int32
    Erforderlich.Die Zeilennummer, in die gewechselt werden soll, beginnend bei 1.
  • Select
    Typ: System.Boolean
    Optional.Gibt an, ob die Zielzeile markiert werden soll.Die Standardeinstellung ist false.

Hinweise

GotoLine hat dieselben Auswirkungen wie TextSelection.MoveToLineAndOffset(Line, 0, False). Wenn Select den Wert true hat, führt GotoLine außerdem EndOfLine(True) aus.

Beispiele

Sub GotoLineExample()
   ' 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)
End Sub

.NET Framework-Sicherheit

Siehe auch

Referenz

TextSelection Schnittstelle

EnvDTE-Namespace