共用方式為


IVsExpansionIntellisenseHost.GetSelection Method

Retrieves the starting and ending positions of the current expansion selection.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

'宣告
Function GetSelection ( _
    <OutAttribute> ByRef iStart As Integer, _
    <OutAttribute> ByRef iEnd As Integer _
) As Integer
'用途
Dim instance As IVsExpansionIntellisenseHost
Dim iStart As Integer
Dim iEnd As Integer
Dim returnValue As Integer

returnValue = instance.GetSelection(iStart, _
    iEnd)
int GetSelection(
    out int iStart,
    out int iEnd
)
int GetSelection(
    [OutAttribute] int% iStart, 
    [OutAttribute] int% iEnd
)
abstract GetSelection : 
        iStart:int byref * 
        iEnd:int byref -> int 
function GetSelection(
    iStart : int, 
    iEnd : int
) : int

Parameters

  • iStart
    Type: System.Int32%
    [out] The start position of the expansion text span.
  • iEnd
    Type: System.Int32%
    [out] The end position of the expansion text span.

Return Value

Type: System.Int32
If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.

Remarks

C++

From singlefileeditor.idl:

HRESULT IVsExpansionIntellisenseHost::GetSelection([out] long *iStart, [out] long *iEnd);

.NET Framework Security

See Also

Reference

IVsExpansionIntellisenseHost Interface

IVsExpansionIntellisenseHost Members

Microsoft.VisualStudio.TextManager.Interop Namespace