Merge pull request #364 from directhex/master
[mono.git] / mcs / class / System.Configuration / System.Configuration / ConfigurationPropertyCollection.cs
index 6743fc0f1bd15c65d49c1c4501f0e7b2b72680f6..33dba87688bba8ab8648c12eeda9646a78b77993 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Configuration
                        collection = new List <ConfigurationProperty> ();
                }
 
-               public virtual int Count {
+               public int Count {
                        get { return collection.Count; }
                }
 
@@ -66,6 +66,8 @@ namespace System.Configuration
 
                public void Add (ConfigurationProperty property)
                {
+                       if (property == null)
+                               throw new ArgumentNullException ("property");
                        collection.Add (property);
                }
 
@@ -98,6 +100,11 @@ namespace System.Configuration
                {
                        return collection.Remove (this [name]);
                }
+               
+               public void Clear ()
+               {
+                       collection.Clear ();
+               }
        }
 }
 #endif