Método EditPoint.Delete

Exclui o intervalo de texto especificado.

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

Sintaxe

'Declaração
Sub Delete ( _
    PointOrCount As Object _
)
void Delete(
    Object PointOrCount
)
void Delete(
    [InAttribute] Object^ PointOrCount
)
abstract Delete : 
        PointOrCount:Object -> unit 
function Delete(
    PointOrCount : Object
)

Parâmetros

Comentários

Se PointOrCount é um TextPoint o objeto, Delete exclui o texto entre o ponto de edição e PointOrCount. Se PointOrCount é um número inteiro, em seguida, Delete o texto a partir da edição de exclusões aponte através do número especificado de caracteres após o ponto de edição, adição de um para cada seqüência newline implícita no final de cada linha.

Se PointOrCount for negativo, em seguida, Delete exclui o texto antes do ponto de edição.

Exemplos

Sub DeleteExample()
   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
        
   ' Change the first letter of the fourth word of the fourth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.CharRight(2)
   objEditPt.Charleft(2)
   objeditpt.Delete(1)
   objEditPt.Insert("p")
End Sub

Segurança do .NET Framework

Consulte também

Referência

EditPoint Interface

Namespace EnvDTE