Método EditPoint.GetLines

Obtém uma cadeia de caracteres que representa o texto entre duas linhas disponíveis.

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

Sintaxe

'Declaração
Function GetLines ( _
    Start As Integer, _
    ExclusiveEnd As Integer _
) As String
string GetLines(
    int Start,
    int ExclusiveEnd
)
String^ GetLines(
    [InAttribute] int Start, 
    [InAttribute] int ExclusiveEnd
)
abstract GetLines : 
        Start:int * 
        ExclusiveEnd:int -> string 
function GetLines(
    Start : int, 
    ExclusiveEnd : int
) : String

Parâmetros

  • Start
    Tipo: System.Int32
    Opcional.O número da linha a última para incluir texto.
  • ExclusiveEnd
    Tipo: System.Int32
    Obrigatório.A primeira linha número para incluir texto.

Valor de retorno

Tipo: System.String
O texto entre duas linhas disponíveis.

Comentários

A cadeia de caracteres retornado representa o texto entre Start (inclusive) e ExclusiveEnd exclusivo ().A cadeia de caracteres inclui caracteres de nova linha (13) caractere de ACSII para a linha limites, e termina com um caractere de nova linha se a linha a última terminou em um caractere de nova linha.

Exemplos

Sub GetLinesExample()
   Dim objTextDoc As TextDocument
   Dim objEditPt As EditPoint, iCtr As Integer
        
   ' 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")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
        
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objeditpt.Insert("This is a test." & Chr(13))
   Next iCtr
   objEditPt.StartOfDocument()
   msgbox("The results of GetLines: " & Chr(13) & objeditpt.GetLines(1, 6))
End Sub

Segurança do .NET Framework

Consulte também

Referência

EditPoint Interface

Namespace EnvDTE