ExpansionFunction::GetSelection Method ()

 

Gets the span of the selected text in the current view.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public:
TextSpan GetSelection()

Return Value

Type: Microsoft.VisualStudio.TextManager.Interop::TextSpan

A TextSpan object containing the span of the selected text.

This helper method calls the GetSelection method on the IVsTextView object that is contained in the ExpansionProvider object. If the ExpansionProvider object is not available, the returned TextSpan object has all of its fields set to 0.

Return to top
Show: