ProfileSettingsCollection.Contains(String) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
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
true
koleksiyon 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"))