IVsTextView.ReplaceTextOnLine 方法
取代的一行文字。
命名空間: Microsoft.VisualStudio.TextManager.Interop
組件: Microsoft.VisualStudio.TextManager.Interop (在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
語法
'宣告
Function ReplaceTextOnLine ( _
iLine As Integer, _
iStartCol As Integer, _
iCharsToReplace As Integer, _
pszNewText As String, _
iNewLen As Integer _
) As Integer
int ReplaceTextOnLine(
int iLine,
int iStartCol,
int iCharsToReplace,
string pszNewText,
int iNewLen
)
int ReplaceTextOnLine(
[InAttribute] int iLine,
[InAttribute] int iStartCol,
[InAttribute] int iCharsToReplace,
[InAttribute] String^ pszNewText,
[InAttribute] int iNewLen
)
abstract ReplaceTextOnLine :
iLine:int *
iStartCol:int *
iCharsToReplace:int *
pszNewText:string *
iNewLen:int -> int
function ReplaceTextOnLine(
iLine : int,
iStartCol : int,
iCharsToReplace : int,
pszNewText : String,
iNewLen : int
) : int
參數
iLine
類型:Int32[in]包含行的整數。
iStartCol
類型:Int32[in]整數,其中包含的開始欄。
iCharsToReplace
類型:Int32[in]整數,包含字元來取代。
pszNewText
類型:String[in]新的文字,不要對傳入的指標。
iNewLen
類型:Int32[in](字元數目) 的緩衝區長度傳遞。
傳回值
類型:Int32
如果此方法將會成功,則會傳回S_OK。如果失敗,它就會傳回錯誤碼。
備註
COM 簽章
從 textmgr.idl:
HRESULT IVsTextView::ReplaceTextOnLine(
[in] long iLine,
[in] CharIndex iStartCol,
[in] long iCharsToReplace,
[in] const WCHAR *pszNewText,
[in] long iNewLen
);
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。