CSC error with enum attribute parameter

activecover

New Member
Why does this give me the exception:\[quote\] CSC error CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type \[/quote\]On my build server???\[code\]/// Customer.cs...[Search(SearchAttribute.SearchDisplay.Regular)] public Category Category{ get; set;}public enum Category : byte{ X = 0x01, Y = 0x02, ...}/// SearchAttribute.cs...[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]public class SearchAttribute : Attribute{ public SearchDisplay Display { get; private set; } public enum SearchDisplay { None = (byte) 0x01, Regular = (byte) 0x02 } public SearchAttribute(SearchDisplay display, string columnName = null) : base() { Display = display; }}\[/code\]Many Thanks.Infuriatingly, it builds fine in VS.
 
Top