将对象右移指定的字数。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
Sub WordRight ( _
    Count As Integer _
)
void WordRight(
    int Count
)
void WordRight(
    [InAttribute] int Count
)
abstract WordRight : 
        Count:int -> unit 
function WordRight(
    Count : int
)
参数
- Count
 类型:System.Int32
 可选。将缓冲区中的编辑点从当前位置向右移动的单词数。
备注
如果在到达 Count 单词数之前就到达文档结尾,则编辑点保持在文档结尾。
如果参数为负,则 WordRight 的执行方式类似于 WordLeft。
示例
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
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。