15.9. Assembly-Level (and Module-Level) Attributes

It is also possible to apply attributes on all types within a given module (for a multi-file assembly; see Chapter 14) or all modules within a given assembly using the [module:] and [assembly:] tags, respectively. For example, assume you wish to ensure that every public member of every public type defined within your assembly is CLS compliant.

NOTE

Chapter 1 mentioned the role of CLS compliant assemblies. Recall that a CLS compliant assembly can be used by all .NET programming languages out-of-the-box. If you create public members of public types which expose non-CLS compliant programming constructs (such as unsigned data or pointer parameters), other .NET languages may not be able to use your ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.