Metodo EditPoint.WordRight

Sposta l'oggetto verso destra a seconda del numero di parole specificato.

Spazio dei nomi:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Sintassi

'Dichiarazione
Sub WordRight ( _
    Count As Integer _
)
void WordRight(
    int Count
)
void WordRight(
    [InAttribute] int Count
)
abstract WordRight : 
        Count:int -> unit 
function WordRight(
    Count : int
)

Parametri

  • Count
    Tipo: System.Int32
    Opzionale.Numero di parole in base al quale spostare il punto di modifica a destra della posizione corrente nel buffer.

Note

Se si raggiunge la fine del documento prima del numero di parole specificato da Count, il punto rimane alla fine del documento.

Se l'argomento è negativo, WordRight si comporta in modo simile a WordLeft.

Esempi

Sub WordRightExample()
   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
       
   ' Replace the eighth word on the third line with a new word.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Delete(4)
   objEditPt.Insert("raid")
End Sub

Sicurezza di .NET Framework

Vedere anche

Riferimenti

EditPoint Interfaccia

Spazio dei nomi EnvDTE