Share via


UrlMappingCollection.RemoveAt(Int32) メソッド

定義

指定したインデックス番号の UrlMapping オブジェクトをコレクションから削除します。

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

パラメーター

index
Int32

削除する UrlMapping オブジェクトのコレクション インデックス。

次のコード例では、 から オブジェクトをUrlMappingUrlMappingCollection削除します。

コレクションを取得する方法については、クラス トピックの UrlMappingCollection コード例を参照してください。


// Remove the URL at the 
// specified index from the collection.
urlMappings.RemoveAt(0);

// Update the configuration file.
if (!urlMappingSection.IsReadOnly())
  configuration.Save();
' Remove the URL at the 
' specified index from the collection.
urlMappings.RemoveAt(0)

' Update the configuration file.
If Not urlMappingSection.IsReadOnly() Then
    configuration.Save()
End If

注釈

メソッドは RemoveAt 、現在の add 階層レベルの セクションの urlMappings 要素を削除し、要素を remove 挿入します。 remove 要素は、階層の上位レベルにある親構成ファイルで定義されている要素への add 参照を実質的に削除しますが、削除しません。

適用対象

こちらもご覧ください