You must call the constructor of the base class and remove the property Description. It also shows how to set a property ExtraInfo.
public class ExtraDescriptionAttribute : DescriptionAttribute
{
public String ExtraInfo { get; private set; }
public ExtraDescriptionAttribute (String description, String extraInfo) : base(description)
{
ExtraInfo = extraInfo;
}
}
The description attribute will now look like this:
[ExtraDescriptionAttribute("Description", "ExtraInfo")]
source
share