I used a decompiler to extract all the code from a DLL (SharpSVN -- cannot get my hands on the source code) and I want to modify an enum to give it a DisplayName.
public enum SvnStatus
{
Zero,
None,
[DisplayName("Not Versioned")]
NotVersioned,
//other one-word values that don't need a display name
}
But this gives me the following error:
Attribute 'System.ComponentModel.DisplayNameAttribute' is not valid on this declaration type. It is valid on 'Class, Method, Property, Event' declarations only.
Googled around and found a number of threads where people seem to do this no problem with their enums. Am I missing something? I can't Resolve
the error in Visual Studio, the option doesn't even show up (but that might be because I just installed Resharper and am not familiar with it yet?)
Edit: Just found DevExpress has a CustomColumnDisplayText
event where I can change the value as desired, so I'm going to go with that instead, since the data is only being displayed in a GridControl.