I'm trying to make the DefaultValueAttribute value dynamic, and this is how I'm attempting to accomplish this
DefaultValueAttribute(string.Format("Copyright @ 2009 - {0} {1}", DateTime.Now.Year.ToString(), "Gods Creation Taxidermy"))]
Doing so gives me this error message:
An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
Is what I'm trying to do just not possible or am I going about it wrong? Any suggestons or ideas?
EDIT: Here's the entire property:
[CategoryAttribute("Text Settings"),
DescriptionAttribute("Copyright Text..."),
DefaultValueAttribute(string.Format("Copyright @ 2009 - {0} {1}", DateTime.Now.Year.ToString(), "Gods Creation Taxidermy"))]
public string CopyrightText { get; set; }