1.

How Do You Specify A Custom Attribute For The Entire Assembly (rather Than For A Class)?

Answer»

Global attributes must APPEAR after any top-level using CLAUSES and before the first type or namespace declarations. An example of this is as follows:
using System;
[ASSEMBLY : MyAttributeClass] class X {}
Note that in an IDE-created PROJECT, by convention, these attributes are placed in AssemblyInfo.cs.

Global attributes must appear after any top-level using clauses and before the first type or namespace declarations. An example of this is as follows:
using System;
[assembly : MyAttributeClass] class X {}
Note that in an IDE-created project, by convention, these attributes are placed in AssemblyInfo.cs.



Discussion

No Comment Found