共用方式為


IVsExpansionIntellisenseHost.SetText Method

Replaces the text span within an expansion selection with new text.

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

Syntax

'宣告
Function SetText ( _
    bstrText As String, _
    fReplaceAll As Integer _
) As Integer
'用途
Dim instance As IVsExpansionIntellisenseHost
Dim bstrText As String
Dim fReplaceAll As Integer
Dim returnValue As Integer

returnValue = instance.SetText(bstrText, _
    fReplaceAll)
int SetText(
    string bstrText,
    int fReplaceAll
)
int SetText(
    [InAttribute] String^ bstrText, 
    [InAttribute] int fReplaceAll
)
abstract SetText : 
        bstrText:string * 
        fReplaceAll:int -> int 
function SetText(
    bstrText : String, 
    fReplaceAll : int
) : int

Parameters

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::SetText([in] BSTR bstrText, [in] BOOL fReplaceAll);

.NET Framework Security

See Also

Reference

IVsExpansionIntellisenseHost Interface

IVsExpansionIntellisenseHost Members

Microsoft.VisualStudio.TextManager.Interop Namespace