다음을 통해 공유


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
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

  • bstrText
    Type: System.String
    [in] A string containing the new text.
  • fReplaceAll
    Type: System.Int32
    [in] If fReplaceAll is true, SetText replaces all text in the buffer (including prefix text). Otherwise, SetText replaces anything within the selection or insert at the selection location if there is a zero-length selection.

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

Microsoft.VisualStudio.TextManager.Interop Namespace