共用方式為


IVsTextViewIntellisenseHost.ReplaceSubjectTextSpan 方法

編輯主旨文字。 如果文字包含 CR/LFs,且旗標有 IHF_SINGLELINESUBJECT 會傳回 E_FAIL (或其他項目)。

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

語法

'宣告
Function ReplaceSubjectTextSpan ( _
    iStartIndex As Integer, _
    iEndIndex As Integer, _
    pszText As String _
) As Integer
int ReplaceSubjectTextSpan(
    int iStartIndex,
    int iEndIndex,
    string pszText
)
int ReplaceSubjectTextSpan(
    [InAttribute] int iStartIndex, 
    [InAttribute] int iEndIndex, 
    [InAttribute] String^ pszText
)
abstract ReplaceSubjectTextSpan : 
        iStartIndex:int * 
        iEndIndex:int * 
        pszText:string -> int
function ReplaceSubjectTextSpan(
    iStartIndex : int, 
    iEndIndex : int, 
    pszText : String
) : int

參數

  • iStartIndex
    類型:Int32

     

  • iEndIndex
    類型:Int32

     

  • pszText
    類型:String

     

傳回值

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

備註

從 singlefileeditor.idl:

HRESULT IVsTextViewIntellisenseHost::ReplaceSubjectTextSpan([in] long iStartIndex, [in] long iEndIndex, [in] LPCWSTR pszText);

.NET Framework 安全性

請參閱

參考

IVsTextViewIntellisenseHost 介面

Microsoft.VisualStudio.TextManager.Interop 命名空間