ProfileSettingsCollection.Contains(String) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定した名前の ProfileSettings オブジェクトがコレクションに含まれているかどうかを示します。
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
コレクション内の ProfileSettings オブジェクトの名前。
返品
true指定したProfileSettingsを持つname オブジェクトがコレクションに含まれている場合は。それ以外の場合はfalse。
例
次のコード例は、 Contains メソッドの使用方法を示しています。 このコード例は、 HealthMonitoringSection クラスに提供されるより大きな例の一部です。
// See if the ProfileSettings collection property contains the event 'Default'.
Console.WriteLine("Profiles contains 'Default': {0}.",
healthMonitoringSection.Profiles.Contains("Default"));
' See if the ProfileSettings collection property contains the event 'Default'.
Console.WriteLine("Profiles contains 'Default': {0}.", _
healthMonitoringSection.Profiles.Contains("Default"))