UrlMappingCollection.RemoveAt(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合移除具有指定索引的 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
,但不會刪除它。