Assemblies and Namespaces

Because several of the previously mentioned problems are related, it’s good to take a look at them collectively. One central issue has to do with tooling, where the requirement of headers describing binary libraries can be solved by bundling this metadata with the code of the library. This is precisely what assemblies do, as shown in Figure 24.3.

Figure 24.3. Assemblies contain code, metadata, and resources.

image

To solve the second issue, which involves avoidance of name clashes for types across multiple libraries, the concept of namespaces has been introduced. Notice that this problem does not directly affect methods because ...

Get C# 4.0 Unleashed 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.