XmlCharacterData.InsertData(Int32, String) 方法

定義

在指定的字元位移處插入指定的字串。

public:
 virtual void InsertData(int offset, System::String ^ strData);
public virtual void InsertData (int offset, string strData);
public virtual void InsertData (int offset, string? strData);
abstract member InsertData : int * string -> unit
override this.InsertData : int * string -> unit
Public Overridable Sub InsertData (offset As Integer, strData As String)

參數

offset
Int32

字串中要插入提供的字串資料的位置。

strData
String

要插入現有字串中的字串資料。

備註

這個方法會引發 XmlNodeChangedAction.Change 事件。

給繼承者的注意事項

在衍生類別中覆寫 InsertData 時,若要正確引發事件,您必須自行引發事件或呼叫此方法的基底版本。

適用於