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:
[assembly: attribute-list]
Module-level attributes are specified as follows:
[module: attribute-list]
where:
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
See the file AssemblyInfo.cs, which is added to all C# projects created in Visual Studio, to see those attributes in use.
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.
[assembly: System.CLSCompliant(true)]
Introduction to Attributes | Using Attributes | Attribute Targets | Creating Custom Attributes | Retrieving Attribute Information