I have something like this:
[Description("Sets the color."),
Category("Values"),
DefaultValue(Color.White),
Browsable(true)]
public Color MyColor
{
get
{
return myColor;
}
set
{
myColor = value;
}
}
private Color myColor = Color.White;
I'm getting an error at this line:
DefaultValue(Color.White),
If the value is a boolean there isn't a problem, but when trying to set it to a color I get: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
Can anyone identify the problem?