NamespaceCollection.RemoveAt(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
移除 ProfileGroupSettings 集合中指定的索引中的物件。
public:
void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
參數
- index
- Int32
一個物件的索引 NamespaceInfo ,從集合中移除。
例外狀況
範例
下列程式代碼範例示範如何使用 RemoveAt 方法。 此程式碼範例是本類別更大範例 PagesSection 的一部分。
// Execute the RemoveAt method.
pagesSection.Namespaces.RemoveAt(0);
' Execute the RemoveAt method.
pagesSection.Namespaces.RemoveAt(0)
備註
若指定元素定義於較高階的設定檔中,此方法會在當前應用程式層級的適當區段插入元素 remove 。 若該元素在目前設定檔中定義,則其條目將從設定檔中移除。 要移除的物件必須存在於集合中;若不成功,則擲出 A ConfigurationException 。