共用方式為


IVsIntellisenseHost.GetSubjectSelection 方法

取得相對於文字的 IntelliSense 作業選取。

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

語法

'宣告
Function GetSubjectSelection ( _
    <OutAttribute> ByRef piAnchorIndex As Integer, _
    <OutAttribute> ByRef piEndIndex As Integer _
) As Integer
int GetSubjectSelection(
    out int piAnchorIndex,
    out int piEndIndex
)
int GetSubjectSelection(
    [OutAttribute] int% piAnchorIndex, 
    [OutAttribute] int% piEndIndex
)
abstract GetSubjectSelection : 
        piAnchorIndex:int byref * 
        piEndIndex:int byref -> int
function GetSubjectSelection(
    piAnchorIndex : int, 
    piEndIndex : int
) : int

參數

  • piAnchorIndex
    類型:Int32%

    [] out主旨文字選取範圍的起始索引。

  • piEndIndex
    類型:Int32%

    [] out主旨文字選取範圍的結束索引。

傳回值

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

備註

C++

從 singlefileeditor.idl:

HRESULT IVsIntellisenseHost::GetSubjectSelection([out] long *piAnchorIndex, [out] long *piEndIndex);

.NET Framework 安全性

請參閱

參考

IVsIntellisenseHost 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間