use MOONLIGHT symbol
[mono.git] / mcs / class / System / System.ComponentModel / PropertyDescriptorCollection.cs
index a5d68bca01752f7888719df752237df2a09c7e2c..07d3b71c9966f62ec4d88bd328af83b9cdd9064d 100644 (file)
@@ -139,11 +139,11 @@ namespace System.ComponentModel
 
                public virtual PropertyDescriptor Find (string name, bool ignoreCase)
                {
-                       if (name == null) {
+                       if (name == null)
                                throw new ArgumentNullException ("name");
-                       }
 
-                       foreach (PropertyDescriptor p in properties) {
+                       for (int i = 0; i < properties.Count; ++i) {
+                               PropertyDescriptor p = (PropertyDescriptor)properties [i];
 #if NET_2_0
                                if (ignoreCase) {
                                        if (0 == String.Compare (name, p.Name, StringComparison.OrdinalIgnoreCase))