ProfileSettingsCollection.Contains(String) 메서드

정의

컬렉션에 지정된 이름의 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 개체의 이름입니다.

반환

Boolean

컬렉션에 지정된 nameProfileSettings 개체가 있으면 true이고, 그렇지 않으면 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"))

적용 대상

추가 정보