The .NET Framework Class Library

Team-Fly    

 
.NET and COM Interoperability Handbook, The
By Alan Gordon
Table of Contents
Chapter One.  What's in a Name ?

The .NET Framework Class Library

All programming languages contain a library of functions and/or classes that provide services to programmers developing software using that language. Examples of these services include string and memory manipulation, file and console Input/Output (I/O), mathematics, date and time manipulation, currency, collections, graphical user interface (GUI), threading, and networking. The need for these libraries can be expressed in one word: reuse. If programmers using a particular language do not have a library of commonly used routines to draw from, they would have to write their own code to implement all of the services, dramatically increasing the cost of developing applications using that language. The .NET Framework class library is a set of classes that provide all of the aforementioned services: string and memory manipulation, file and console I/O, etc. The .NET Framework class library also provides classes that handle security, configuration, diagnostics, messaging, globalization, and reflection (metadata inspection and generation). The .NET Framework class library is composed of several hundred classes. It would be difficult to get your arms around the classes if they weren't broken up into what are called namespaces. Namespaces are just a way of grouping related classes together into a common naming scope. Class names only need to be unique in their naming scope, although the classes in the .NET Framework class library are unique across all namespaces. Table 1-1 shows the list of namespaces in the .NET Framework class library and some of the key classes in each namespace.

The key advantage of the .NET Framework class library is that, because these classes are implemented using a CLR-compliant compiler (they are written in C#) and they adhere to the CLS, you can use them from any CLR-compliant programming language. You can even create your own subclasses by inheriting from classes in the .NET Framework class library regardless of what language you are using. If you are a Visual C++ programmer, you can imagine that the .NET Framework class library is a language-independent version of the Microsoft Foundation Classes (MFC).

The .NET Framework class library is implemented as a set of assemblies. You can find these assemblies beneath the Framework directory of your Microsoft .NET installation. On my machine, these files reside at D:\WINNT\Microsoft.NET\Framework\v1.0.3705\ . The leaf directory in this path ( v1.0.3705 ) is correct for the 1.0 release version of the .NET Framework, but your number may vary. A number of assemblies are in this directory, and most of them they have the same name as their namespace. For instance, the security classes can be found in System.Security.DLL, and the messaging classes can be found in System.Messaging.DLL. The classes in the System namespace are an exception to this naming convention; they can be found in mscorlib.dll.

Table 1-1. Namespaces and key classes in the .NET Framework class library.

Namespace

Description

Key Classes

System

Contains all of the basic types

Object, Array, String

System.Collections

Contains classes for managing collections of objects

Queue, Dictionary, Hashtable, SortedList, Stack

System.IO

Contains classes for file-based I/O and reading and writing data streams

File, FileStream, MemoryStream, StreamReader, StreamWriter

System.Net

Contains types for network communication

WebRequest, WebResponse, TcpClient, TcpListener, Sockets

System.Security

Contains types that enable security features

Permissions, Policy, Cryptography

System.Globalization

Contains types that support internationalization

Calendar, CultureInfo

System.Runtime.Remoting

Contains types that allow for managing remote objects

ChannelServices, Remoting Services

System.Runtime.InteropServices

A collection of types that support using COM objects

Marshal, COMException

System.Data

The types that make up ADO.NET

DataSet, DataTable

System.Web

The types that support Web browser to server communications

HttpApplication, HttpContext, HttpRequest, HttpResponse

System.Web.UI

The types that support ASP.NET Web Forms

Page, Control, UserControl

System.Web.Services

The types that support ASP.NET Web services

WebService, WebMethodAttribute

System.Windows.Forms

Types that support the creation of Windows rich client applications

Form, Control, TreeView, ListView

System.EnterpriseServices

Types that support using COM+ services

ServicedComponent, ContextUtil, TransactionAttribute

System.XML

Types that provide support for processing XML

XmlDataDocument, XmlReader, XmlWriter


Team-Fly    
Top
 


. Net and COM Interoperability Handbook
The .NET and COM Interoperability Handbook (Integrated .Net)
ISBN: 013046130X
EAN: 2147483647
Year: 2002
Pages: 119
Authors: Alan Gordon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net