RuleSettingsCollection.Contains(String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した名前のtrue オブジェクトがコレクションに含まれている場合は、RuleSettingsを返します。
public:
bool Contains(System::String ^ name);
public bool Contains(string name);
member this.Contains : string -> bool
Public Function Contains (name As String) As Boolean
パラメーター
- name
- String
コレクション内の RuleSettings オブジェクトの名前。
返品
true 指定した名前の RuleSettings オブジェクトがコレクションに含まれている場合は。それ以外の場合は false。
例
次のコード例は、 Contains メソッドの使用方法を示しています。 このコード例は、 HealthMonitoringSection クラスに提供されるより大きな例の一部です。
// See if the Rules collection property contains the RuleSettings 'All Errors Default'.
Console.WriteLine("EventMappings contains 'All Errors Default': {0}.",
healthMonitoringSection.Rules.Contains("All Errors Default"));
' See if the Rules collection property contains the RuleSettings 'All Errors Default'.
Console.WriteLine("EventMappings contains 'All Errors Default': {0}.", _
healthMonitoringSection.Rules.Contains("All Errors Default"))
注釈
指定した名前が存在しない場合は、 false を返します。