Поделиться через


TextSelection.SelectLine - метод

Обновлен: Ноябрь 2007

Выделяет строку, содержащую активную точку.

Пространство имен:  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

Разрешения

См. также

Ссылки

TextSelection Интерфейс

TextSelection - члены

EnvDTE - пространство имен