System.Configuration.ConfigurationPropertyCollection.Contains C# (CSharp) Метод

Contains() публичный Метод

public Contains ( String name ) : bool
name String
Результат bool
        public bool Contains(String name) {
            for (int index = 0; index < _items.Count; index++) {
                ConfigurationProperty cp = (ConfigurationProperty)_items[index];
                if (cp.Name == name) {
                    return true;
                }
            }
            return false;
        }

Usage Example

Пример #1
0
 private string GetProperty(string PropName)
 {
     if (_properties.Contains(PropName))
     {
         ConfigurationProperty prop = _properties[PropName];
         if (prop != null)
         {
             return((string)base[prop]);
         }
     }
     return(null);
 }
All Usage Examples Of System.Configuration.ConfigurationPropertyCollection::Contains