* ConfigurationSectionCollection.cs : GetEnumerator() should return
IEnumerator for the items, not keys.
* ConfigurationProperty.cs : more helpful type mismatch message.
svn path=/trunk/mcs/; revision=75801
+2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ConfigurationSectionCollection.cs : GetEnumerator() should return
+ IEnumerator for the items, not keys.
+ * ConfigurationProperty.cs : more helpful type mismatch message.
+
2007-04-16 Marek Habersack <mhabersack@novell.com>
* SectionGroupInfo.cs: another (and final, hopefully) fix for bug
else
if (!type.IsAssignableFrom (default_value.GetType ())) {
if (!this.converter.CanConvertFrom (default_value.GetType ()))
- throw new ConfigurationErrorsException (String.Format ("The default value for property '{0}' has a different type than the one of the property itself",
- name));
+ throw new ConfigurationErrorsException (String.Format ("The default value for property '{0}' has a different type than the one of the property itself: expected {1} but was {2}",
+ name, type, default_value.GetType ()));
default_value = this.converter.ConvertFrom (default_value);
}
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)