Export (0) Print
Expand All
Expand Minimize

Class Library

.NET Framework 1.1

The .NET Framework class library is a library of classes, interfaces, and value types that are included in the Microsoft .NET Framework SDK. This library provides access to system functionality and is designed to be the foundation on which .NET Framework applications, components, and controls are built.

Usage

Exceptions

Thread Safety

Namespaces

The .NET Framework class library provides the following namespaces:

Microsoft.CSharp
Contains classes that support compilation and code generation using the C# language.
Microsoft.JScript
Contains classes that support compilation and code generation using the JScript language.
Microsoft.VisualBasic
Contains classes that support compilation and code generation using the Visual Basic .NET language.
Microsoft.Vsa
Contains interfaces that allow you to integrate script for the .NET Framework script engines into applications, and to compile and execute code at run time.
Microsoft.Win32
Provides two types of classes: those that handle events raised by the operating system and those that manipulate the system registry.
System
Contains fundamental classes and base classes that define commonly used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.

Other classes provide services supporting data type conversion, method parameter manipulation, mathematics, remote and local program invocation, application environment management, and supervision of managed and unmanaged applications.

System.CodeDom
Contains classes that can be used to represent the elements and structure of a source code document. These elements can be used to model the structure of a source code document that can be output as source code in a supported language using the functionality provided by the System.CodeDom.Compiler namespace.
System.CodeDom.Compiler
Contains types for managing the generation and compilation of source code in supported programming languages. Code generators can each produce source code in a particular programming language based on the structure of Code Document Object Model (CodeDOM) source code models consisting of elements provided by the System.CodeDom namespace.
System.Collections
Contains interfaces and classes that define various collections of objects, such as lists, queues, bit arrays, hashtables and dictionaries.
System.Collections.Specialized
Contains specialized and strongly typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
System.ComponentModel
Provides classes that are used to implement the run-time and design-time behavior of components and controls. This namespace includes the base classes and interfaces for implementing attributes and type converters, binding to data sources, and licensing components.
System.ComponentModel.Design
Contains classes that developers can use to build custom design-time behavior for components and user interfaces for configuring components at design time. The design time environment provides systems that enable developers to arrange components and configure their properties.
System.ComponentModel.Design.Serialization
Provides types that support customization and control of serialization at design time.
System.Configuration
Provides classes and interfaces that allow you to programmatically access .NET Framework configuration settings and handle errors in configuration files (.config files).
System.Configuration.Assemblies
Contains classes that are used to configure an assembly.
System.Configuration.Install
Provides classes that allow you to write custom installers for your own components. The Installer class is the base class for all custom installers in the .NET Framework.
System.Data
Consists mostly of the classes that constitute the ADO.NET architecture. The ADO.NET architecture enables you to build components that efficiently manage data from multiple data sources. In a disconnected scenario (such as the Internet), ADO.NET provides the tools to request, update, and reconcile data in multiple tier systems. The ADO.NET architecture is also implemented in client applications, such as Windows Forms, or HTML pages created by ASP.NET.
System.Data.Common
Contains classes shared by the .NET Framework data providers. A .NET Framework data provider describes a collection of classes used to access a data source, such as a database, in the managed space.
System.Data.Odbc
Encapsulates the .NET Framework Data Provider for ODBC. A .NET Framework data provider describes a collection of classes used to access a data source, such as a database, in the managed space. Using the OdbcDataAdapter class, you can fill a memory-resident DataSet, which you can use to query and update the data source.

For additional information about how to use this namespace, see the OdbcDataReader, the OdbcCommand, and the OdbcConnection classes.

Note: This namespace is supported only in version 1.1 of the .NET Framework.

System.Data.OleDb
Encapsulates the .NET Framework Data Provider for OLE DB. The .NET Framework Data Provider for OLE DB describes a collection of classes used to access an OLE DB data source in the managed space.
System.Data.OracleClient
Encapsulates the .NET Framework Data Provider for Oracle. The .NET Framework Data Provider for Oracle describes a collection of classes used to access an Oracle data source in the managed space.
Note: This namespace is supported only in version 1.1 of the .NET Framework.
System.Data.SqlClient
Encapsulates the .NET Framework Data Provider for SQL Server. The .NET Framework Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space.
System.Data.SqlServerCE
Describes a collection of classes that can be used to access a database in SQL Server CE from Windows CE-based devices in the managed environment. With this namespace you can create SQL Server CE databases on a device and also establish connections to SQL Server databases that are on a device or on a remote server.

Note: This namespace is supported only in version 1.1 of the .NET Framework.

System.Data.SqlTypes
Provides classes for native data types within SQL Server. These classes provide a safer, faster alternative to other data types. Using the classes in this namespace helps prevent type conversion errors caused in situations where loss of precision could occur. Because other data types are converted to and from SqlTypes behind the scenes, explicitly creating and using objects within this namespace results in faster code as well.
System.Diagnostics
Provides classes that allow you to interact with system processes, event logs, and performance counters. This namespace also provides classes that allow you to debug your application and to trace the execution of your code. For more information, see the Trace and Debug classes.
System.Diagnostics.SymbolStore
Provides classes that allow you to read and write debug symbol information, such as source line to Microsoft intermediate language (MSIL) maps. Compilers targeting the .NET Framework can store the debug symbol information into programmer's database (PDB) files. Debuggers and code profiler tools can read the debug symbol information at run time.
System.DirectoryServices
Provides easy access to Active Directory from managed code. The namespace contains two component classes, DirectoryEntry and DirectorySearcher, which use the Active Directory Services Interfaces (ADSI) technology. ADSI is the set of interfaces that Microsoft provides as a flexible tool for working with a variety of network providers. ADSI gives the administrator the ability to locate and manage resources on a network with relative ease, regardless of the network's size.
System.Drawing
Provides access to GDI+ basic graphics functionality. More advanced functionality is provided in the System.Drawing.Drawing2D, System.Drawing.Imaging, and System.Drawing.Text namespaces.
System.Drawing.Design
Contains classes that extend design-time user interface (UI) logic and drawing. You can further extend this design-time functionality to create custom toolbox items, type-specific value editors that can edit and graphically represent values of their supported types, or type converters that can convert values between certain types. This namespace provides the basic frameworks for developing extensions to the design-time UI.
System.Drawing.Drawing2D
Provides advanced 2-dimensional and vector graphics functionality. This namespace includes the gradient brushes, the Matrix class (used to define geometric transforms), and the GraphicsPath class.
System.Drawing.Imaging
Provides advanced GDI+ imaging functionality. Basic graphics functionality is provided by the System.Drawing namespace.
System.Drawing.Printing
Provides print-related services. Typically, you create a new instance of the PrintDocument class, set the properties that describe what to print, and call the Print method to actually print the document.
System.Drawing.Text
Provides advanced GDI+ typography functionality. Basic graphics functionality is provided by the System.Drawing namespace. The classes in this namespace allow users to create and use collections of fonts.
System.EnterpriseServices
Provides an important infrastructure for enterprise applications. COM+ provides a services architecture for component programming models deployed in an enterprise environment. This namespace provides .NET Framework objects with access to COM+ services, making the .NET Framework objects more practical for enterprise applications.
System.EnterpriseServices.CompensatingResourceManager
Provides classes that allow you to use a Compensating Resource Manager (CRM) in managed code. A CRM is a service provided by COM+ that enables you to include non-transactional objects in Microsoft Distributed Transaction Coordinator (DTC) transactions. Although CRMs do not provide the capabilities of a full resource manager, they do provide transactional atomicity (all-or-nothing behavior) and durability through the recovery log.
System.EnterpriseServices.Internal
Provides infrastructure support for COM+ services. The classes and interfaces in this namespace are specifically intended to support calls into System.EnterpriseServices from the unmanaged COM+ classes.
System.Globalization
Contains classes that define culture-related information, including the language, the country/region, the calendars in use, the format patterns for dates, currency, and numbers, and the sort order for strings. These classes are useful for writing globalized (internationalized) applications.
System.IO
Contains types that allow synchronous and asynchronous reading and writing on data streams and files.
System.IO.IsolatedStorage
Contains types that allow the creation and use of isolated stores. With these stores, you can read and write data that less trusted code cannot access and prevent the exposure of sensitive information that can be saved elsewhere on the file system. Data is stored in compartments that are isolated by the current user and by the assembly in which the code exists.
System.Management
Provides access to a rich set of management information and management events about the system, devices, and applications instrumented to the Windows Management Instrumentation (WMI) infrastructure.
System.Management.Instrumentation
Provides the classes necessary for instrumenting applications for management and exposing their management information and events through WMI to potential consumers. Consumers such as Microsoft Application Center or Microsoft Operations Manager can then manage your application easily, and monitoring and configuring of your application is available for administrator scripts or other applications, both managed as well as unmanaged.
System.Messaging
Provides classes that allow you to connect to, monitor, and administer message queues on the network and send, receive, or peek messages.
System.Net
Provides a simple programming interface for many of the protocols used on networks today. The WebRequest and WebResponse classes form the basis of what are called pluggable protocols, an implementation of network services that enables you to develop applications that use Internet resources without worrying about the specific details of the individual protocols.
System.Net.Sockets
Provides a managed implementation of the Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
System.Reflection
Contains classes and interfaces that provide a managed view of loaded types, methods, and fields, with the ability to dynamically create and invoke types.
System.Reflection.Emit
Contains classes that allow a compiler or tool to emit metadata and Microsoft intermediate language (MSIL) and optionally generate a PE file on disk. The primary clients of these classes are script engines and compilers.
System.Resources
Provides classes and interfaces that allow developers to create, store, and manage various culture-specific resources used in an application.
System.Runtime.CompilerServices
Provides functionality for compiler writers using managed code to specify attributes in metadata that affect the run-time behavior of the common language runtime. The classes in this namespace are for compiler writers use only.
System.Runtime.InteropServices
Provides a wide variety of members that support COM interop and platform invoke services. If you are unfamiliar with these services, see Interoperating with Unmanaged Code .
System.Runtime.InteropServices.CustomMarshalers
Supports the .NET infrastructure and is not intended to be used directly from your code.
System.Runtime.InteropServices.Expando
Contains the IExpando interface which allows modification of an object by adding or removing its members.
System.Runtime.Remoting
Provides classes and interfaces that allow developers to create and configure distributed applications.
System.Runtime.Remoting.Activation
Provides classes and objects that support server and client activation of remote objects.
System.Runtime.Remoting.Channels
Contains classes that support and handle channels and channel sinks, which are used as the transport medium when a client calls a method on a remote object.
System.Runtime.Remoting.Channels.Http
Contains channels that use the HTTP protocol to transport messages and objects to and from remote locations. By default, the HTTP channels encode objects and method calls in SOAP format for transmission, but other encoding and decoding formatter sinks can be specified in the configuration properties of a channel.
System.Runtime.Remoting.Channels.Tcp
Contains channels that use the TCP protocol to transport messages and objects to and from remote locations. By default, the TCP channels encode objects and method calls in binary format for transmission, but other encoding and decoding formatter sinks can be specified in the configuration properties of a channel.
System.Runtime.Remoting.Contexts
Contains objects that define the contexts all objects reside within. A context is an ordered sequence of properties that defines an environment for the objects within it. Contexts are created during the activation process for objects that are configured to require certain automatic services such synchronization, transactions, just-in-time (JIT) activation, security, and so on. Multiple objects can live inside a context.
System.Runtime.Remoting.Lifetime
Contains classes that manage the lifetime of remote objects. Traditionally, distributed garbage collection uses reference counts and pinging for control over the lifetime of objects. This works well when there are a few clients per service, but doesn't scale well when there are thousands of clients per service. The remoting lifetime service associates a lease with each service, and deletes a service when its lease time expires. The lifetime service can take on the function of a traditional distributed garbage collector, and it also adjusts well when the numbers of clients per server increases.
System.Runtime.Remoting.Messaging
Contains classes used to create and remote messages. The remoting infrastructure uses messages to communicate with remote objects. Messages are used to transmit remote method calls, to activate remote objects, and to communicate information. A message object carries a set of named properties, including action identifiers, envoy information, and parameters.
System.Runtime.Remoting.Metadata
Contains classes and attributes that can be used to customize generation and processing of SOAP for objects and fields. The classes of this namespace can be used to indicate the SOAPAction, type output, XML element name, and the method XML namespace URI.
System.Runtime.Remoting.Metadata.W3cXsd2001
Contains the XML Schema Definition (XSD) defined by the World Wide Web Consortium (W3C) in 2001. The XML Schema Part2: Data types specification from W3C identifies format and behavior of various data types. This namespace contains wrapper classes for the data types that conform to the W3C specification. All date and time types conform to the ISO standards specification.
System.Runtime.Remoting.MetadataServices
Contains the classes used by the Soapsuds.exe command line tool and the user code to convert metadata to and from XML schema for the remoting infrastructure.
System.Runtime.Remoting.Proxies
Contains classes that control and provide functionality for proxies. A proxy is a local object that is an image of a remote object. Proxies enable clients to access objects across remoting boundaries.
System.Runtime.Remoting.Services
Contains service classes that provide functionality to the .NET Framework.
System.Runtime.Serialization
Contains classes that can be used for serializing and deserializing objects. Serialization is the process of converting an object or a graph of objects into a linear sequence of bytes for either storage or transmission to another location. Deserialization is the process of taking in stored information and recreating objects from it.
System.Runtime.Serialization.Formatters
Provides common enumerations, interfaces, and classes that are used by serialization formatters.
System.Runtime.Serialization.Formatters.Binary
Contains the BinaryFormatter class, which can be used to serialize and deserialize objects in binary format.
System.Runtime.Serialization.Formatters.Soap
Contains the SoapFormatter class, which can be used to serialize and deserialize objects in the SOAP format.
System.Security
Provides the underlying structure of the .NET Framework security system, including base classes for permissions.
System.Security.Cryptography
Provides cryptographic services, including secure encoding and decoding of data, as well as many other operations, such as hashing, random number generation, and message authentication.
System.Security.Cryptography.X509Certificates
Contains the common language runtime implementation of the Authenticode X.509 v.3 certificate. This certificate is signed with a private key that uniquely and positively identifies the holder of the certificate.
System.Security.Cryptography.Xml
Contains classes to support the creation and validation of XML digital signatures. The classes in this namespace implement the World Wide Web Consortium Recommendation, "XML-Signature Syntax and Processing", described at http://www.w3.org/TR/xmldsig-core/.
System.Security.Permissions
Defines classes that control access to operations and resources based on policy.
System.Security.Policy
Contains code groups, membership conditions, and evidence. These three types of classes are used to create the rules applied by the .NET Framework security policy system. Evidence classes are the input to security policy and membership conditions are the switches; together these create policy statements and determine the granted permission set. Policy levels and code groups are the structure of the policy hierarchy. Code groups are the encapsulation of a rule and are arranged hierarchically in a policy level.
System.Security.Principal
Defines a principal object that represents the security context under which code is running.
System.ServiceProcess
Provides classes that allow you to implement, install, and control Windows service applications. Services are long-running executables that run without a user interface. Implementing a service involves inheriting from the ServiceBase class and defining specific behavior to process when start, stop, pause, and continue commands are passed in, as well as custom behavior and actions to take when the system shuts down.
System.Text
Contains classes representing ASCII, Unicode, UTF-7, and UTF-8 character encodings; abstract base classes for converting blocks of characters to and from blocks of bytes; and a helper class that manipulates and formats String objects without creating intermediate instances of String.
System.Text.RegularExpressions
Contains classes that provide access to the .NET Framework regular expression engine. The namespace provides regular expression functionality that can be used from any platform or language that runs within the Microsoft .NET Framework.
System.Threading
Provides classes and interfaces that enable multithreaded programming. In addition to classes for synchronizing thread activities and access to data (Mutex, Monitor, Interlocked, AutoResetEvent, and so on), this namespace includes a ThreadPool class that allows you to use a pool of system-supplied threads, and a Timer class that executes callback methods on thread pool threads.
System.Timers
Provides the Timer component, which allows you to raise an event on a specified interval.
System.Web
Supplies classes and interfaces that enable browser-server communication. This namespace includes the HTTPRequest class that provides extensive information about the current HTTP request, the HTTPResponse class that manages HTTP output to the client, and the HTTPServerUtility object that provides access to server-side utilities and processes. System.Web also includes classes for cookie manipulation, file transfer, exception information, and output cache control.
System.Web.Caching
Provides classes for caching frequently used data on the server. This includes the Cache class, a dictionary that allows you to store arbitrary data objects, such as hash tables and data sets. It also provides expiration functionality for those objects, and methods that allow you to add and removed the objects. You can also add the objects with a dependency upon other files or cache entries, and perform a callback to notify your application when an object is removed from the Cache.
System.Web.Configuration
Contains classes that are used to set up ASP.NET configuration.
System.Web.Hosting
Provides the functionality for hosting ASP.NET applications from managed applications outside of Microsoft Internet Information Services (IIS).
System.Web.Mail
Contains classes that enable you to construct and send messages using the CDOSYS Message component. The mail message is delivered through either the SMTP mail service built into Microsoft Windows 2000 or through an arbitrary SMTP server. The classes in this namespace can be used either from ASP.NET or from any managed application.
System.Web.Mobile
Contains the core capabilities, including authentication and error-handling, required for building ASP.NET mobile Web applications.
System.Web.Security
Contains classes that are used to implement ASP.NET security in Web server applications.
System.Web.Services
Consists of the classes that enable you to create XML Web services using ASP.NET and XML Web service clients. XML Web services are applications that provide the ability to exchange messages in a loosely coupled environment using standard protocols such as HTTP, XML, XSD, SOAP, and WSDL. XML Web services enable the building of modular applications within and across companies in heterogeneous environments making them interoperable with a broad variety of implementations, platforms and devices. The SOAP-based XML messages of these applications can have well-defined (structured and typed), or loosely defined parts (using arbitrary XML). The ability of the messages to evolve over time without breaking the protocol is fundamental to the flexibility and robustness of XML Web services as a building block for the future of the Web.
System.Web.Services.Configuration
Consists of the classes that configure how XML Web services created using ASP.NET run.
System.Web.Services.Description
Consists of the classes that enable you to publicly describe an XML Web service by using the Web Services Description Language (WSDL). Each class in this namespace corresponds to a specific element in the WSDL specification, and the class hierarchy corresponds to the XML structure of a valid WSDL document.
System.Web.Services.Discovery
Consists of the classes that allows XML Web service clients to locate the available XML Web services on a Web server through a process called XML Web services Discovery.
System.Web.Services.Protocols
Consists of the classes that define the protocols used to transmit data across the wire during the communication between XML Web service clients and XML Web services created using ASP.NET.
System.Web.SessionState
Supplies classes and interfaces that enable storage of data specific to a single client within a Web application on the server. The session state data is used to give the client the appearance of a persistent connection with the application. State information can be stored within local process memory or, for Web farm configurations, out-of-process using either the ASP.NET State Service or a SQL Server database.
System.Web.UI
Provides classes and interfaces that allow you to create controls and pages that will appear in your Web applications as user interface on a Web page. This namespace includes the Control class, which provides all controls, whether HTML, Web, or User controls, with a common set of functionality. It also includes the Page control, which is generated automatically whenever a request is made for a page in your Web application. Also provided are classes which provide the Web Forms Server Controls data binding functionality, the ability to save the view state of a given control or page, as well as parsing functionality for both programmable and literal controls.
System.Web.UI.Design
Contains classes that can be used to extend design-time support for Web Forms.
System.Web.UI.Design.WebControls
Contains classes that can be used to extend design-time support for Web server controls.
System.Web.UI.HtmlControls
Consists of a collection of classes that allow you to create HTML server controls on a Web Forms page. HTML server controls run on the server and map directly to standard HTML tags supported by most browsers. This allows you to programmatically control the HTML elements on a Web Forms page.
System.Web.UI.MobileControls
Contains a set of ASP.NET server controls that can intelligently render your application for different mobile devices.
System.Web.UI.MobileControls.Adapters
Contains the core device adapter classes used by the ASP.NET mobile controls for device customization and extended device support.
System.Web.UI.WebControls
Contains classes that allow you to create Web server controls on a Web page. Web server controls run on the server and include form controls such as buttons and text boxes. They also include special purpose controls such as a calendar. Because Web server controls run on the server, you can programmatically control these elements. Web server controls are more abstract than HTML server controls. Their object model does not necessarily reflect HTML syntax.
System.Windows.Forms
Contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system.
System.Windows.Forms.Design
Contains classes that support design-time configuration and behavior for Windows Forms components. These classes consist of: Designer classes that provide support for Windows Forms components, a set of design time services, UITypeEditor classes for configuring certain types of properties, and classes for importing ActiveX controls.
System.Xml
Provides standards-based support for processing XML.
System.Xml.Schema
Contains the XML classes that provide standards-based support for XML Schemas definition language (XSD) schemas.
System.Xml.Serialization
Contains classes that are used to serialize objects into XML format documents or streams.
System.Xml.XPath
Contains the XPath parser and evaluation engine. It supports the W3C XML Path Language (XPath) Version 1.0 Recommendation (www.w3.org/TR/xpath).
System.Xml.Xsl
Provides support for Extensible Stylesheet Transformation (XSLT) transforms. It supports the W3C XSL Transformations (XSLT) Version 1.0 Recommendation (www.w3.org/TR/xslt).

Usage

The class library reference documentation can be filtered by language, so that you can view syntax, descriptions, and examples for one language (either Visual Basic, C#, the Managed Extensions for C++, or JScript) or all four languages at once. To filter by language, click the filtering icon Language Filter at the top of any reference page and select a language or choose Show All.

Exceptions

All instance methods in the class library throw an instance of NullReferenceException when an attempt is made to call the method and the underlying object holds a null reference. Because this exception can occur with any instance method, it is not explicitly listed in the reference documentation for each instance method.

The class library documentation lists the other exceptions that each member throws along with a description of the condition under which it is thrown.

Thread Safety

All public static members (methods, properties, fields, and events) within the .NET Framework support concurrent access within a multithreaded environment. Therefore, any .NET Framework static member can be simultaneously invoked from two threads without encountering race conditions, deadlocks, or crashes.

For all classes and structures in the .NET Framework, check the Thread Safety section in the API reference documentation to determine whether it is thread safe. If you want to use a class that is not thread-safe in a multithreaded environment, you must wrap an instance of the class with code that supplies the necessary synchronization constructs.

See Also

.NET Framework Reference | Introduction to the .NET Framework Class Library

Show:
© 2014 Microsoft