13.1. Namespaces

Throughout the examples in Parts One and Two of this book, and in most of the examples to follow, we've commonly placed a using statement (more formally referred to as a using directive) at the top of our programs to allow us to access the elements of a particular namespace by their simple names. By way of review, a namespace is a logical grouping of related programming elements, as was briefly discussed in Chapter 1; the .NET Framework libraries are so vast that namespaces are used to divide the libraries up into more manageable sublibraries.

A simple name is the name of the class as it appears in the class declaration; for example:

// This class has the simple name "Student".
public class Student {
  // Details omitted.
}

Get Beginning C# 2008 Objects: From Concept to Code 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.