共用方式為


IVsTextSpanSet.GetAt 方法

傳回所要求的文字範圍。

命名空間:  Microsoft.VisualStudio.TextManager.Interop
組件:  Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

語法

'宣告
Function GetAt ( _
    iEl As Integer, _
    <OutAttribute> pSpan As TextSpan() _
) As Integer
int GetAt(
    int iEl,
    TextSpan[] pSpan
)
int GetAt(
    [InAttribute] int iEl, 
    [OutAttribute] array<TextSpan>^ pSpan
)
abstract GetAt : 
        iEl:int * 
        pSpan:TextSpan[] byref -> int
function GetAt(
    iEl : int, 
    pSpan : TextSpan[]
) : int

參數

  • iEl
    類型:Int32

    [in]整數,其中包含的文字跨越元素數目。

傳回值

類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。

備註

COM 簽章

從 textmgr.idl:

HRESULT IVsTextSpanSet::GetAt(
   [in] LONG iEl, 
   [out, retval] TextSpan * pSpan
);

iEl參數是以零起始的索引小於計數傳回到GetCount

.NET Framework 安全性

請參閱

參考

IVsTextSpanSet 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間