ClientTargetCollection.RemoveAt(Int32) メソッド

定義

指定したコレクション インデックスを持つ ClientTarget オブジェクトを削除します。

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

パラメーター

index
Int32

削除する ClientTarget のコレクション インデックス。

次のコード例では、ClientTarget コレクションからClientTargetCollection オブジェクトを削除します。

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


// Remove the client target at the 
// specified index from the collection.
clientTargets.RemoveAt(0);

// Update the configuration file.
if (!clientTargetSection.IsReadOnly())
  configuration.Save();
' Remove the client target at the 
' specified index from the collection.
clientTargets.RemoveAt(0)

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

注釈

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

適用対象

こちらもご覧ください