更新:2007 年 11 月
选择包含活动点的行。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
Sub SelectLine
用法
Dim instance As TextSelection
instance.SelectLine()
void SelectLine()
void SelectLine()
function SelectLine()
示例
Sub SelectLineExample()
   ' Before running this example, open a text document.
   Dim objSel As TextSelection = DTE.ActiveDocument.Selection
   ' Advance to the next Visual Basic function beginning or end by 
   ' searching for  "Sub" with white space before and after it.
   If objSel.FindPattern(":WhSub:Wh", vsFindOptions.vsFindOptionsRegularExpression) Then
      ' Select the entire line.
      objSel.SelectLine()
   End If
End Sub
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。