次の方法で共有


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 上位レベルの構成ファイルで定義されている要素に対して、構成ファイルの適切なセクションに要素を挿入します。 要素が現在の構成ファイルの適切なセクションで定義されている場合、そのエントリは構成ファイルから削除されます。 削除するオブジェクトは、コレクション内に存在する必要があります。

適用対象

こちらもご覧ください