Método TextSelection.GotoLine

Move para o começo da linha indicada e seleciona a linha, se solicitado.

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

Sintaxe

'Declaração
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
)

Parâmetros

  • Line
    Tipo: System.Int32
    Obrigatório.A linha de número para ir para, começando em um.
  • Select
    Tipo: System.Boolean
    Opcional.Indica se a linha de destino deve ser selecionada.O padrão é false.

Comentários

GotoLinetem o mesmo efeito que TextSelection.MoveToLineAndOffset(Line, 0, False). If Select is true, then GotoLine also performs EndOfLine(True).

Exemplos

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

Segurança do .NET Framework

Consulte também

Referência

TextSelection Interface

Namespace EnvDTE