ViewFilter.GetSelection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the current selection, adjusted to become a positive text span
public:
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
public:
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
Microsoft::VisualStudio::TextManager::Interop::TextSpan GetSelection();
public Microsoft.VisualStudio.TextManager.Interop.TextSpan GetSelection ();
member this.GetSelection : unit -> Microsoft.VisualStudio.TextManager.Interop.TextSpan
Public Function GetSelection () As TextSpan
Returns
Returns a TextSpan object specifying the selected span of text.
Remarks
This method calls the GetSelectionSpan method on the IVsTextView object passed to the ViewFilter class constructor. The resulting TextSpan object contains the span of the selected text or the location of the caret if no text is selected.