ECMA-334 C# Language Specification24.3.2: Run-time retrieval of an attribute instance |
Compilation of an attribute yields an attribute class T, an instance constructor C on T, a positional-argument-list
P, and a named-argument-list
N. Given this information, an attribute instance can be retrieved at run-time using the following steps:
object-creation-expression
of the form new T(P), using the instance constructor C as determined at compile-time. These steps either result in an exception, or produce an instance of T. Call this instance O. named-argument
Arg in N, in order: named-argument
Arg. If Name does not identify a non-static public read-write field or property on O, then an exception is thrown. attribute-argument-expression
of Arg. positional-argument-list
P and the named-argument-list
N.