Aracılığıyla paylaş


ProfileSettingsCollection.Contains(String) Yöntem

Tanım

Koleksiyonun belirtilen ada sahip bir ProfileSettings nesne içerip içermediğini gösterir.

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

Parametreler

name
String

Koleksiyondaki bir ProfileSettings nesnenin adı.

Döndürülenler

Boolean

truekoleksiyon belirtilen ile bir ProfileSettings nesne içeriyorsa; değilse, false.name

Örnekler

Aşağıdaki kod örneğinde yönteminin nasıl kullanılacağı gösterilmektedir Contains . Bu kod örneği, sınıfı için HealthMonitoringSection sağlanan daha büyük bir örneğin parçasıdır.

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

Şunlara uygulanır

Ayrıca bkz.