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 オブジェクトのコレクション インデックス。

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

コレクションを取得する方法については、 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 要素への参照を実質的に削除しますが、削除しません。

適用対象

こちらもご覧ください