[Mono-dev] [PATCH] Default value fixes for WebControl, + UnitConverter infinite loop fix

Michael Hutchinson m.j.hutchinson at gmail.com
Fri Aug 19 10:08:36 EDT 2005

Some corrected default values for the properties of
There's also a fix for a potential infinite loop in UnitConverter that
occurs when converting to/from non-string types.

Could someone review this, and if ther are no objections I'll commit it.

On a related note, I am uncomfortable with the constructor for

public DefaultValueAttribute (Type type, string value)
	try {
		TypeConverter converter = TypeDescriptor.GetConverter (type);
		DefaultValue = converter.ConvertFromString (null,
CultureInfo.InvariantCulture, value);
	} catch { }
It should not be swallowing exceptions; if there are any, then the
dveloper has given the DefaultValueAttribute a bad value. However, I'm
reluctant to suggest changing this right now in case it breaks


-------------- next part --------------
A non-text attachment was scrubbed...
Name: DefaultValue.patch
Type: text/x-patch
Size: 3488 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050819/538e4aab/attachment.bin 

More information about the Mono-devel-list mailing list