Extend the list of permitted attribute parameter types #4771
Replies: 3 comments 3 replies
-
What should be the value of "DateTime.Now"? Should it be the time when the binary was build? Should it re-evaluated at runtime to the current time? |
Beta Was this translation helpful? Give feedback.
-
Mildly related:
There was one other proposal, but I was unable to find it. It was about compile-time constant values for arbitrary blittable/struct types. |
Beta Was this translation helpful? Give feedback.
-
The TL;DR of all of the referenced issues/discussions is that the list of supported types permitted in an attribute's properties and parameters are limited by the runtime. The runtime would need to be modified to support other types and establish how those types are encoded into the metadata of the assembly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
This code throws compile error
Proposal
Modify the compiler so the attributes would accept new types and runtime evaluated expressions.
Beta Was this translation helpful? Give feedback.
All reactions