24 CHAPTER 1 THE (Florida web design) PHILOSOPHY OF .NET
24 CHAPTER 1 THE PHILOSOPHY OF .NET Table 1-4. (Continued) .NET Namespace Meaning in Life System.IO These namespaces include file I/O, buffering, and so forth. As of System.IO.Compression .NET 2.0, the IO namespaces now include support compression System.IO.Ports and port manipulation. System.Net This namespace (as well as other related namespaces) contains types related to network programming (requests/responses, sockets, end points, and so on). System.Reflection These namespaces define types that support runtime type System.Reflection.Emit discovery as well as dynamic creation of types. System.Runtime. This namespace provides facilities to allow .NET types to interact InteropServices with unmanaged code (e.g., C-based DLLs and COM servers) and vice versa. System.Runtime.Remoting This namespace (among others) defines types used to build solutions that incorporate the .NET remoting layer. System.Security Security is an integrated aspect of the .NET universe. In the security-centric namespaces you find numerous types dealing with permissions, cryptography, and so on. System.Threading This namespace defines types used to build multithreaded applications. System.Web A number of namespaces are specifically geared toward the development of .NET web applications, including ASP.NET and XML web services. System.Windows.Forms This namespace contains types that facilitate the construction of traditional desktop GUI applications. System.Xml The XML-centric namespaces contain numerous types used to interact with XML data. Accessing a Namespace Programmatically It is worth reiterating that a namespace is nothing more than a convenient way for us mere humans to logically understand and organize related types. Consider again the System namespace. From your perspective, you can assume that System.Console represents a class named Console that is contained within a namespace called System. However, in the eyes of the .NET runtime, this is not so. The runtime engine only sees a single entity named System.Console. In C#, the using keyword simplifies the process of referencing types defined in a particular namespace. Here is how it works. Let s say you are interested in building a traditional desktop application. The main window renders a bar chart based on some information obtained from a back-end database and displays your company logo. While learning the types each namespace contains takes study and experimentation, here are some obvious candidates to reference in your program: // Here are all the namespaces used to build this application. using System; // General base class library types. using System.Drawing; // Graphical rendering types. using System.Windows.Forms; // GUI widget types. using System.Data; // General data-centric types. using System.Data.SqlClient; // MS SQL Server data access types. Once you have specified some number of namespaces (and set a reference to the assemblies that define them), you are free to create instances of the types they contain. For example, if you are interested in creating an instance of the Bitmap class (defined in the System.Drawing namespace), you can write:
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.