Taal

ProfileSettingsCollection.Contains(String) Methode

Definitie

Geeft aan of de verzameling een ProfileSettings object met de opgegeven naam bevat.

public:
 bool Contains(System::String ^ name);
public bool Contains(string name);
member this.Contains : string -> bool
Public Function Contains (name As String) As Boolean

Parameters

name
String

De naam van een ProfileSettings object in de verzameling.

Retouren

trueals de verzameling een ProfileSettings object bevat met de opgegevenname; anders. false

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de Contains methode gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de HealthMonitoringSection klasse.

// 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"))

Van toepassing op

Zie ook