TextPointer.DeleteTextInRun(Int32) 方法

定義

從目前 TextPointer所指示的位置刪除指定的字元數。

public:
 int DeleteTextInRun(int count);
public int DeleteTextInRun(int count);
member this.DeleteTextInRun : int -> int
Public Function DeleteTextInRun (count As Integer) As Integer

參數

count
Int32

從當前位置開始刪除的字元數。 指定一個正值以刪除緊隨當前位置的字元;指定負值以刪除當前位置前的字元。

傳回

實際刪除的字元數量。

例外狀況

此方法在不允許文字輸入的位置被呼叫。

備註

指定一個正值來刪除緊隨目前位置的字元(如 LogicalDirection.Forward);指定負值以刪除位於當前位置之前的字元(如 LogicalDirection.Backward)。

實際刪除的字元數量可能少於由 所 count指定的數字。 這種情況發生在 count 指定字元數超過可刪除字元數的情況下。

適用於

另請參閱