IVsTextView.GetSelectionSpan, méthode

Retourne l'étendue de texte associée avec une sélection.

Espace de noms :  Microsoft.VisualStudio.TextManager.Interop
Assembly :  Microsoft.VisualStudio.TextManager.Interop (dans Microsoft.VisualStudio.TextManager.Interop.dll)

Syntaxe

'Déclaration
Function GetSelectionSpan ( _
    <OutAttribute> pSpan As TextSpan() _
) As Integer
int GetSelectionSpan(
    TextSpan[] pSpan
)
int GetSelectionSpan(
    [OutAttribute] array<TextSpan>^ pSpan
)
abstract GetSelectionSpan : 
        pSpan:TextSpan[] byref -> int
function GetSelectionSpan(
    pSpan : TextSpan[]
) : int

Paramètres

Valeur de retour

Type : Int32
Si la méthode réussit, elle retourne S_OK.En cas d'échec, un code d'erreur est retourné.

Notes

Signature de COM

De textmgr.idl :

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

Cette méthode est similaire à l'GetSelection mais aux retours une structure d'TextSpan avec les coordonnées de mémoire tampon de texte.

Sécurité .NET Framework

Voir aussi

Référence

IVsTextView Interface

Microsoft.VisualStudio.TextManager.Interop, espace de noms