Compartir a través de


EditPoint2.Delete (Método)

Elimina el intervalo de texto especificado.

Espacio de nombres:  EnvDTE80
Ensamblado:  EnvDTE80 (en EnvDTE80.dll)

Sintaxis

'Declaración
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

  • PointOrCount
    Tipo: Object

    Obligatorio. Representa un objeto TextPoint o un número de caracteres.

Comentarios

Si PointOrCount es un objeto TextPoint, Delete elimina el texto entre el punto de edición y PointOrCount. Si el valor de PointOrCount es un número entero, Delete elimina el texto desde el punto de edición hasta el número de caracteres especificado a continuación de este punto (agregando un carácter por cada secuencia de nueva línea implícita al final de cada línea).

Si el valor de PointOrCount es negativo, Delete elimina texto situado delante del punto de edición.

Ejemplos

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

Seguridad de .NET Framework

Vea también

Referencia

EditPoint2 Interfaz

EnvDTE80 (Espacio de nombres)