System.Configuration.ConfigurationPropertyCollection.Contains C# (CSharp) Method

Contains() public method

public Contains ( String name ) : bool
name String
return 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

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