Compartir a través de


IVsTextView.GetSelectionSpan(TextSpan[]) Method

Definition

Returns the text span associated with a selection.

public:
 int GetSelectionSpan(cli::array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pSpan);
public:
 int GetSelectionSpan(Platform::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> ^ pSpan);
int GetSelectionSpan(std::Array <Microsoft::VisualStudio::TextManager::Interop::TextSpan> const & pSpan);
public int GetSelectionSpan (Microsoft.VisualStudio.TextManager.Interop.TextSpan[] pSpan);
abstract member GetSelectionSpan : Microsoft.VisualStudio.TextManager.Interop.TextSpan[] -> int
Public Function GetSelectionSpan (pSpan As TextSpan()) As Integer

Parameters

pSpan
TextSpan[]

[out] Pointer to a TextSpan structure containing the span information.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextView::GetSelectionSpan(  
   [out] TextSpan *pSpan  
);  

This method is similar to GetSelection but returns a TextSpan structure with the text buffer coordinates.

Applies to