Summary

This chapter covered the subject of namespaces, and included a brief discussion about scope and visibility. The namespaces discussion provided rationale for why namespaces are necessary, including organization and avoiding conflict.

There was a section on how to make abbreviated code references. It included examples of how to employ the using directive to avoid adding fully qualified names to every method call. The alias directive provides a way to use shorthand notation when executing class members.

Once namespaces were well explained, this chapter showed how to create them. This included nested namespaces and some tips on how to organize a namespace hierarchy. There was also a section that detailed the members of a namespace.

The final ...

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