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

適用於

另請參閱