I want to pass some list of enums to my Attribute property. But it's pretty you can pass List to Attribute's property. So I tried converting it to string representation and tried to do something like this:
[MyAtt(Someproperty =
Enums.SecurityRight.A.ToString() + "&" + (Enums.SecurityRight.B.ToString() ))]
However, this gives the error: "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type"
I understand you can only pass constants. But how do I get away with this? Any tricks?
Thanks.