LinkLabel.LinkCollection.RemoveAt(Int32) 方法

定義

移除位於集合中指定位置的連結。

public:
 virtual void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

參數

index
Int32

要從集合中移除之項目的以零起始的索引。

實作

例外狀況

index 值為負值或大於集合中的項目數。

備註

當您從集合中移除連結時,集合中後續專案的索引會變更。 已刪除連結的所有資訊都會遺失。 您可以使用這個方法,藉由指定要從集合中移除的連結索引,從集合中移除特定連結。 若要指定要移除的連結,而不是連結的索引,請使用 Remove 方法。 若要從集合中移除所有連結,請使用 Clear 方法。

適用於

另請參閱