Contains() public method

public Contains ( String name ) : bool
name String
return bool
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);
 }
        public void Prerequisite_ConfigurationPropertyCollection_Contains_IsCaseSensitive()
        {
            ConfigurationPropertyCollection configurationPropertyCollection = new ConfigurationPropertyCollection
            {
                new ConfigurationProperty("First", typeof(object)),
            };

            Assert.IsTrue(configurationPropertyCollection.Contains("First"));
            Assert.IsFalse(configurationPropertyCollection.Contains("first"));
        }