EventMappingSettingsCollection.Contains(String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Indique si la collection contient un EventMappingSettings objet portant le nom spécifié.
public:
bool Contains(System::String ^ name);
public bool Contains(string name);
member this.Contains : string -> bool
Public Function Contains (name As String) As Boolean
Paramètres
- name
- String
Nom d’un EventMappingSettings objet dans la collection.
Retours
true si la collection contient un EventMappingSettings objet portant le nom spécifié ; sinon, false.
Exemples
L’exemple de code suivant montre comment utiliser la Contains méthode. Cet exemple de code fait partie d’un exemple plus grand fourni pour la HealthMonitoringSection classe.
// See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.",
healthMonitoringSection.EventMappings.Contains("HeartBeats"));
' See if the EventMappings collection property contains the event 'HeartBeats'.
Console.WriteLine("EventMappings contains 'HeartBeats': {0}.", _
healthMonitoringSection.EventMappings.Contains("HeartBeats"))
Remarques
Cette méthode retourne false si le nom spécifié n’existe pas.