Contains() public method

public Contains ( String name ) : bool
name String
return bool
コード例 #1
0
 private string GetProperty(string PropName)
 {
     if (_properties.Contains(PropName))
     {
         ConfigurationProperty prop = _properties[PropName];
         if (prop != null)
         {
             return((string)base[prop]);
         }
     }
     return(null);
 }
コード例 #2
0
        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"));
        }