O'Reilly logo

The C# Programming Language (Covering C# 4.0), Fourth Edition by Peter Golde, Scott Wiltamuth, Mads Torgersen, Anders Hejlsberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. Namespaces

C# programs are organized using namespaces. Namespaces are used both as an “internal” organization system for a program and as an “external” organization system—a way of presenting program elements that are exposed to other programs.

Using directives (§9.4) are provided to facilitate the use of namespaces.

Bill Wagner

As you read this, remember that namespaces are a logical organization: Multiple namespaces can, and often do, occur in one assembly, and a single namespace may be declared in many different assemblies.

9.1 Compilation Units

A compilation-unit defines the overall structure of a source file. A compilation unit consists of zero or more using-directives followed by zero or more global-attributes followed by zero ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required