NotifyCollectionChangedEventArgs.NewStartingIndex 屬性

定義

取得發生變更所在的索引。

public:
 property int NewStartingIndex { int get(); };
int NewStartingIndex();
public int NewStartingIndex { get; }
var int32 = notifyCollectionChangedEventArgs.newStartingIndex;
Public ReadOnly Property NewStartingIndex As Integer

屬性值

Int32

int

發生變更的索引。

備註

使用 .NET 進行程式設計時,這個類別會隱藏,開發人員應該使用 System.Collections.Specialized.NotifyCollectionChangedEventArgs 類別。

NewStartingIndex 將包含下列值,視事件資料中所報告的 動作 而定。

動作
加入 新加入項目的索引。
移動 新加入項目的索引。 因為 Move 可以邏輯方式視為虛擬 Remove ,後面接著虛擬 新增,所以此處報告的索引可能已經針對虛擬 Remove進行調整。
移除 -1
Replace 已取代專案的索引。
重設 -1

請注意,這個值是帶正負號的。 這會啟用 -1 值案例。

適用於

另請參閱