0 out of 2 rated this helpful - Rate this topic

TextSelection.SelectLine Method

Selects the line containing the active point.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

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
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.