RuleSettingsCollection.RemoveAt(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中移除指定索引位置的 RuleSettings 物件。
public:
void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
參數
- index
- Int32
集合中物件的有效索引 RuleSettings 。
例外狀況
集合中指定的索引中沒有 RuleSettings 物件,元素已被移除,或集合是唯讀。
範例
下列程式代碼範例示範如何使用 RemoveAt 方法。 此程式碼範例是本類別更大範例 HealthMonitoringSection 的一部分。
// Remove a RuleSettings object from the Rules collection property.
healthMonitoringSection.Rules.RemoveAt(0);
' Remove a RuleSettings object from the Rules collection property.
healthMonitoringSection.Rules.RemoveAt(0)
備註
此方法將元素插入 remove 設定檔中對應高階設定檔中定義的元素的適當區段。 如果該元素在目前設定檔的適當區段中被定義,該元素的條目會從設定檔中移除。 要移除的物件必須存在於集合中。