BufferModesCollection.Remove(String) メソッド

定義

BufferModeSettings オブジェクトをコレクションから削除します。

public:
 void Remove(System::String ^ s);
public void Remove(string s);
member this.Remove : string -> unit
Public Sub Remove (s As String)

パラメーター

s
String

コレクション内の BufferModeSettings オブジェクトの名前。

例外

指定したキーを持つ BufferModeSettings オブジェクトがコレクションに存在しないか、要素が既に削除されているか、コレクションが読み取り専用です。

次のコード例は、 Remove メソッドの使用方法を示しています。 このコード例は、 HealthMonitoringSection クラスに提供されるより大きな例の一部です。

// Remove a BufferModeSettings object from the BufferModes collection property.
healthMonitoringSection.BufferModes.Remove("Error Log");
' Remove a BufferModeSettings object from the BufferModes collection property.
healthMonitoringSection.BufferModes.Remove("Error Log")

注釈

このメソッドは、上位レベルの構成ファイルで定義されているすべての要素の構成ファイルの適切なセクションに、 remove 要素を挿入します。 要素が現在の構成ファイルの適切なセクションで定義されている場合、そのエントリは構成ファイルから削除されます。 削除するオブジェクトはコレクション内に存在する必要があります。

適用対象

こちらもご覧ください