共用方式為


IVsIntellisenseHost.GetContextSelection 方法

取得選取項目,相對於內容的緩衝區。

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

語法

'宣告
Function GetContextSelection ( _
    <OutAttribute> pSelectionSpan As TextSpan() _
) As Integer
int GetContextSelection(
    TextSpan[] pSelectionSpan
)
int GetContextSelection(
    [OutAttribute] array<TextSpan>^ pSelectionSpan
)
abstract GetContextSelection : 
        pSelectionSpan:TextSpan[] byref -> int
function GetContextSelection(
    pSelectionSpan : TextSpan[]
) : int

參數

傳回值

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

備註

C++

從 singlefileeditor.idl:

HRESULT IVsIntellisenseHost::GetContextSelection([out] TextSpan *pSelectionSpan);

.NET Framework 安全性

請參閱

參考

IVsIntellisenseHost 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間