Merge pull request #644 from knocte/connstrings
[mono.git] / mcs / class / System.Configuration / System.Configuration / ConfigurationSectionCollection.cs
index b2d8932fde85a18667512272b46d22315a5b453a..5b0f531e55d587d0fd1baeb8d20826a7bd236cc7 100644 (file)
@@ -27,7 +27,6 @@
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 
-#if NET_2_0
 using System;
 using System.Collections;
 using System.Collections.Specialized;
@@ -42,6 +41,7 @@ namespace System.Configuration
                Configuration config;
                
                internal ConfigurationSectionCollection (Configuration config, SectionGroupInfo group)
+                       : base (StringComparer.Ordinal)
                {
                        this.config = config;
                        this.group = group;
@@ -108,7 +108,8 @@ namespace System.Configuration
                
                public override IEnumerator GetEnumerator()
                {
-                       return group.Sections.AllKeys.GetEnumerator ();
+                       foreach (string key in group.Sections.AllKeys)
+                               yield return this [key];
                }
                
                public string GetKey (int index)
@@ -136,4 +137,4 @@ namespace System.Configuration
                }
        }
 }
-#endif
+