Chapter 3
The .NET Framework Class Library

The .NET Framework class library (FCL) provides the API that managed applications write to. Including more than 7,000 types鈥攃lasses, structs, interfaces, enumerations, and delegates鈥攖he FCL is a rich resource that includes everything from basic types such as Int32 and String to exotic types such as Regex, which represents regular expressions, and Form, which is the base class for windows in GUI applications. I鈥檒l often use the word 鈥渃lasses鈥?to refer to FCL members, but realize that I鈥檓 taking literary license and that the FCL is not, as you are well aware after reading Chapter 2, merely a class library.

The FCL is partitioned into approximately 100 hierarchically organized namespaces. System is the root for most namespaces. It defines core data types such as Int32 and Byte, as well as utility types such as Math and TimeSpan. A name such as System.Data refers to a namespace that is a child of the System namespace. It鈥檚 not unusual to find namespaces nested several levels deep, as in System.Runtime.Remoting.Channels.Tcp.

Segregating FCL types into namespaces adds structure to the .NET Framework class library and makes it easier to find the classes you need as you learn your way around the FCL. Learning is made easier by the fact that namespace names reflect what the types in a namespace are used for. For example, System.Web.UI.WebControls contains ASP.NET Web controls, while System.Collections is home to the FCL鈥檚 collection classes鈥?span class="programelement">Hashtable, ArrayList, and others.

This chapter introduces some of the .NET Framework class library鈥檚 key classes and namespaces. It鈥檚 not meant to be exhaustive; no chapter can possibly cover the FCL in its entirety. The classes you鈥檒l read about here are ones that tend to be used by a broad cross-section of applications. They were chosen not only for their generality, but also because they provide a fair and accurate representation of the breadth, depth, and wide-ranging capabilities of the .NET Framework class library.