>private Size _testSize; > >[DefaultValue(typeof(System.Drawing.Size), "100, 45")] >public Size TestSize >{ > get { return _testSize; } > set > { > _testSize = value; > } >} >>If you look at the help for the DefaultValueAttribute class (attribute) and look at the available constructors you can see the following constructor signature.
>public DefaultValueAttribute( > Type type, > string value >); >>The string value must be compatible with your types TypeConverter, in this case:-
>System.Drawing.SizeConverter >>This allows you to reset complex types that the DefaultValueAttribute has no specific knowledge of.
[DefaultValue(typeof(System.Drawing.Size), "100, 45")] is <DefaultValue(GetType(System.Drawing.Size), "100, 45")>Regards,