HttpModuleActionCollection.RemoveAt(Int32) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したインデックス位置にある HttpModuleAction モジュールをコレクションから削除します。
public:
void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
パラメーター
- index
- Int32
削除する HttpModuleAction モジュールのインデックス。
例外
コレクション内の指定したインデックスに HttpModuleAction オブジェクトがない、要素が既に削除されている、またはコレクションが読み取り専用です。
例
次の例は、コレクションから HttpModuleAction モジュールを削除する方法を示しています。
// Remove the module from the collection.
if (!httpModulesSection.SectionInformation.IsLocked)
{
modulesCollection.RemoveAt(0);
configuration.Save();
}
' Remove the module from the collection.
If Not httpModulesSection.SectionInformation.IsLocked Then
modulesCollection.RemoveAt(0)
configuration.Save()
End If
注釈
このメソッドは、上位レベルの構成ファイルで定義されているすべての要素の構成ファイルの適切なセクションに、 <remove> 要素を挿入します。 要素が現在の構成ファイルの適切なセクションで定義されている場合、そのエントリは構成ファイルから削除されます。 削除するオブジェクトはコレクション内に存在する必要があります。