RuleSettingsCollection.RemoveAt(Int32) メソッド

定義

指定したインデックス位置にある 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 要素を挿入します。 要素が現在の構成ファイルの適切なセクションで定義されている場合、そのエントリは構成ファイルから削除されます。 削除するオブジェクトはコレクション内に存在する必要があります。

適用対象

こちらもご覧ください