What limitation caused this?
The reason you cannot do what you describe is probably not caused by any restriction, but it is purely a language design decision. Basically, when developing the language, they said: "It should be possible, but not that." If they really wanted this to be possible, the "limitations" would be resolved, and that would be possible. However, I do not know any concrete arguments in favor of this decision.
/.../ passing a string (calling strict input code too!) with these values, turning into strings, and then relying on Regex to try to get the value instead of just using the actual value /.../
I have been in similar situations. Sometimes I wanted to use attributes with lambda expressions to implement something in a functional way. But in the end, C # is not a functional language , and if I wrote the code in a non-functional way, I had no need for such attributes.
In short, I think so: if I want to develop this in a functional way, I have to use a functional language, for example f #. Now I use C #, and I do it non-functionally, and then I do not need such attributes.
Perhaps you should just rethink your design and not use attributes such as you currently have.
UPDATE 1:
I argued that C # is not a functional language, but it is a subjective opinion, and there is no strict definition of "Functional language". I agree with Adam Wright "/.../As such, I would not become the C # class as functional in the general discussion - this is, at best, a multi-paradigm with some functional taste." Why is C # a functional programming language?
UPDATE 2: I found this post from Jon Skeet: fooobar.com/questions/16374 / ... He finds it impossible to use common attribute types, but the reasoning may be similar in this case:
Eric Lippert's answer (rephrased): There is no particular reason, except to avoid the complexity of both the language and the compiler for use, which does not add much significance.