Visibility
Namespaces don’t have a notion of visibility. In C# terms, you could say namespaces are implicitly declared as public because they can’t be used to restrict visibility of the types defined within them. In other words, it’s up to the types (and members therein) to declare their visibility.
Figure 24.7 illustrates how namespaces are totally compiled away into longer type names, which is what the CLR sees. In other words, there’s no place in an assembly to put metadata (such as visibility) on a namespace declaration. What tools like ILDASM and .NET Reflector do is show types in their namespaces by analyzing the dot-separated pattern followed for their naming. The fact there’s no such thing as metadata associated with a namespace is reflected ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access