Share via


TextPoint.Line 속성

개체의 줄 번호를 가져옵니다.

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

구문

‘선언
ReadOnly Property Line As Integer
    Get
int Line { get; }
property int Line {
    int get ();
}
abstract Line : int
function get Line () : int

속성 값

형식: System.Int32
개체의 줄 번호를 나타내는 정수 값입니다.

설명

줄 번호는 1부터 시작합니다.

예제

Sub LineExample()
   Dim objTextDoc As TextDocument
   Dim objTP As TextPoint, iCtr As Integer
   Dim msg As String

   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")

   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objTP = objTextDoc.StartPoint.CreateEditPoint

   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objTP.Insert("This is a test." & Chr(13))
   Next iCtr

   ' Display text point location information.
   objTP.StartOfDocument()
   msg = "DisplayColumn value: " & objTP.DisplayColumn & vbCr
   msg = msg & "Line value: " & objTP.Line & vbCr
   msg = msg & "LineCharOffset value: " & objTP.LineCharOffset & vbCr
   msg = msg & "LineLength value: " & objTP.LineLength & vbCr
   MsgBox(msg)
End Sub

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

TextPoint 인터페이스

EnvDTE 네임스페이스