Most attributes are attached to specific language elements, such as classes or methods; however, some attributes are global — they apply to an entire assembly or module. Assembly-level attributes are specified as follows:
Module-level attributes are specified as follows:
- A list of applicable global attributes.
Global attributes appear in the source code after any top-level using directives and before any type or namespace declarations. Global attributes can appear in multiple source files in a single compilation.
Of the .NET Framework assembly-level attributes, the following let you modify the information in an assembly:
Use the file created by Strong Name Utility (SN.exe) as the parameter to AssemblyKeyFileAttribute, AssemblyKeyNameAttribute, or AssemblyDelaySignAttribute to sign (or give a strong name to) your assembly.
See the file AssemblyInfo.cs, which is added to all C# projects created in Visual Studio, to see those attributes in use.
Note Assembly-level attributes are ignored if you are not creating an assembly.
The CLSCompliant attribute indicates whether all types defined in the assembly comply with the .NET Framework common language specification.