If I have an enum like this
public enum Hungry
{
Somewhat,
Very,
CouldEatMySocks
}
and a custom attribute like this
<
Hungry? is equal to Nullable, which in terms mean that
[Hunger(NullableHungerLevel = Hungry.CouldEatMySocks)]
is equal to
[Hunger(NullableHungerLevel = new Nullable(Hungry.CouldEatMySocks))]
Since you can only use constant values in named attribute arguments you will have to resort to Shimmy's solution.