Compartilhar via


Método IVsTextView.GetSelectionSpan

Retorna o intervalo de texto associado a uma seleção.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (em Microsoft.VisualStudio.TextManager.Interop.dll)

Sintaxe

'Declaração
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

Parâmetros

Valor de retorno

Tipo: Int32
Se o método for bem-sucedido, ele retorna S_OK.Se ele falhar, ele retorna um código de erro.

Comentários

COM assinatura

De textmgr.idl:

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

Este método é semelhante a GetSelection mas retorna um TextSpan estrutura com as coordenadas do buffer de texto.

Segurança do .NET Framework

Consulte também

Referência

IVsTextView Interface

Namespace Microsoft.VisualStudio.TextManager.Interop