Share via


OutputCacheProfileCollection.RemoveAt(Int32) 方法

定義

從集合中移除位於指定索引位置的 OutputCacheProfile 物件。

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

參數

index
Int32

要從集合移除的 OutputCacheProfile 項目索引。

例外狀況

集合中沒有具備指定索引鍵的 OutputCacheProfile 物件,該項目可能已經移除,或者集合是唯讀的。

範例

下列程式碼範例示範如何使用 RemoveAt 方法。

// Remove the output profile with the specified index.
outputCacheProfiles.RemoveAt(0);
' Remove the output profile with the specified index.
  outputCacheProfiles.RemoveAt(0)

備註

方法 RemoveAt 會將 remove 專案插入組態檔的對應區段中,以取得較高層級組態檔中定義的任何專案。 如果專案是在目前組態檔的對應區段中定義,則會從組態檔中移除其專案。 要移除的物件必須存在於集合中。

適用於

另請參閱