다음을 통해 공유


TextSelection.GotoLine 메서드

표시된 줄의 시작으로 이동하여, 요청 시 해당 줄을 선택합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
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
)

매개 변수

  • Line
    형식: Int32

    필수 요소. 이동할 줄 번호로 1부터 시작합니다.

  • Select
    형식: Boolean

    선택적 요소. 대상 줄을 선택해야 하는지 여부를 나타냅니다. 기본값은 false입니다.

설명

GotoLine은 TextSelection.MoveToLineAndOffset(Line, 0, False)와 같은 효과를 가집니다. Select가 true이면 GotoLine에서 EndOfLine(True)을 수행합니다.

예제

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 보안

참고 항목

참조

TextSelection 인터페이스

EnvDTE 네임스페이스