ExpansionFunction.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.
Gets the span of the selected text in the current view.
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
A TextSpan object containing the span of the selected text.
Remarks
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.