I have a propertygrid that myclass is objectsource of it. In my class I define one item from Size type. How can I set default value in item attribute ?
Please see my code :
[CategoryAttribute("Information"), DefaultValue(Size(0, 0))]
public Size AndaazehPixel { get; set; }
my error : 'System.Drawing.Size' is a 'type' but is used like a 'variable'
Try it like this:
[DefaultValue(typeof(Size), "0, 0")]
public Size AndaazehPixel { get; set; }