Table of Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Notes DownloadECMA-334 C# Language Specification


24 Attributes
24.3 Attribute instances
24.3.1 Compilation of an attribute
Paragraph 11 The compilation of an attribute with attribute class T, positional-argument-list P and named-argument-list N, consists of the following steps: - 2 Follow the compile-time processing steps for compiling an object-creation-expression of the form new T(P). 3 These steps either result in a compile-time error, or determine an instance constructor on T that can be invoked at run-time. 4 Call this instance constructor C.
- 5 If C does not have public accessibility, then a compile-time error occurs.
- 6 For each named-argument Arg in N:
- 7 Let Name be the identifier of the named-argument Arg.
- 8 Name must identify a non-static read-write public field or property on T. 9 If T has no such field or property, then a compile-time error occurs.
- 10 Keep the following information for run-time instantiation of the attribute: the attribute class T, the instance constructor C on T, the positional-argument-list P and the named-argument-list N.
|
Jagger Software Ltd |
Company # 4070126 |
VAT # 762 5213 42 |

