Home > Store

.NET Framework Standard Library Annotated Reference, Volume 2: Networking Library, Reflection Library, and XML Library

Register your product to gain access to bonus material or receive a coupon.

.NET Framework Standard Library Annotated Reference, Volume 2: Networking Library, Reflection Library, and XML Library

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2006
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-321-19445-4
  • ISBN-13: 978-0-321-19445-9

“This is a complete, authoritative, and truly useful reference for every .NET developer. It covers every aspect of .NET Framework library by providing concise descriptions with just the right number of examples. I would not start development of any significant .NET project without having this book on my bookshelf.”
—Max Loukianov, Vice President of Research and Development, Netpise Inc.
“The .NET Framework Standard Library Annotated Reference is the one reference you really need when you use the .NET Framework library. The annotations provide clear insight into the design choices that the library development team made when building the library. Those explanations will guide you to the best design choices for your own application code.”
—Bill Wagner, Founder/Consultant, SRT Solutions, and author of Effective C#
“More than just a reference, this book provides great insight into the massive amount of thought that went into designing the Microsoft .NET Framework. It is both entertaining and educational, combining interesting and sometimes amusing annotations along with the reference material.”
—Jordan Matthiesen, Software Engineer
“Brad Abrams, Tamara Abrams, and the CLR team take readers on a journey through the backstreets of the .NET Framework, pointing out invaluable design decisions and performance best practices along the way. Not to be missed by any developer who has ever wondered why the Framework is designed the way it is.”
—William D. Bartholomew, Senior Software Architect, Orli-TECH Pty Ltd
“This volume provides an in-depth review for every class method listed, including a CD with many examples of usage. The most valuable aspect of this book is the annotations provided; the annotators’ thoughts about the design of the .NET Framework lets the reader develop a crystal-clear understanding of what can be accomplished with this fantastic technology.”
—Bradley Snobar, Software Engineer
“The utility of a reference book is often a function of how easily you can find a desired subject and, once there, how clearly is it explained. On both counts, you should find that this book stands well.”
—Dr. Wes Boudville, Inventor

The .NET Framework Standard Library Annotated Reference, Volume 2, completes the definitive reference to the .NET Framework base class library. This book-and-CD set offers programmers unparalleled insight into the ECMA and ISO specifications for the classes and members, while also explaining why they were designed as they were and demonstrating how to use them. This volume covers the Networking, Reflection, and XML libraries, complementing Volume 1’s coverage of the Base Class and Extended Numerics libraries.

The printed book contains high-level descriptions of each namespace, plus detailed descriptions and samples of each type, including annotations, inheritance diagrams, and a listing of members.

The accompanying CD contains a vastly expanded version of the book’s text that includes detailed descriptions of each member and samples for most members—almost two thousand searchable pages of immediately useful reference material, plus a full source-code archive.

With the ECMA and ISO standards as its core, the combined book and CD include

  • A clear and complete overview of each namespace, describing its purpose and functionality and the inheritance hierarchy of types it defines.
  • Type descriptions. Each type is covered in its own chapter, with a quick reference to the C# declaration syntax for all members defined in the type, and a detailed description of how the type is used.
  • Annotations from key insiders: members of the Microsoft design team and the ECMA Standards Committee. These comments cover everything from design rationale and history to common problems and shortcomings, with exceptional clarity and candor.
  • Reference tabs and an exhaustive index, which allow readers to quickly and easily navigate the text.
  • Code samples. Types are illustrated by working code samples, with output included.
  • Reusable source code for the more than one thousand samples is supplied as an archive on the CD. All code has been tested with versions 1.0, 1.1, and 2.0 of the .NET Framework and, where appropriate, with the .NET Compact Framework.

Sample Content

Downloadable Sample Chapter

Download the Sample Chapter related to this title.

Table of Contents



Annotators' Biographies.












    System.Net.Sockets.AddressFamily Enum





    System.AssemblyLoadEventHandler Delegate





    System.Reflection.BindingFlags Enum

    System.Runtime.InteropServices.CallingConvention Enum


    System.Runtime.InteropServices.CharSet Enum

    System.Reflection.ConstructorInfo Structure











    System.Reflection.EventAttributes Enum



    System.Reflection.FieldAttributes Enum



    System.Xml.Formatting Enum

    System.Runtime.InteropServices.GCHandle Structure

    System.Runtime.InteropServices.GCHandleType Enum


    System.Net.HttpContinueDelegate Delegate

    System.Net.HttpStatusCode Enum




    System.Net.IAuthenticationModule Interface

    System.Net.ICredentials Interface


    System.IntPtr Structure





    System.Net.IWebProxy Interface

    System.Net.IWebRequestCreate Interface

    System.Runtime.InteropServices.LayoutKind Enum






    System.Reflection.MethodAttributes Enum



    System.Runtime.CompilerServices.MethodImplOptions Enum









    System.Ne.NetworkAccess Enum





    System.Reflection.ParameterAttributes Enum


    System.Reflection.ParameterModifier Structure

    System.Reflection.PropertyAttributes Enum


    System.Net.Sockets.ProtocolType Enum


    System.Xml.ReadState Enum



    System.Security.Permissions.ReflectionPermissionFlag Enum

    System.RuntimeFieldHandle Structure


    System.RuntimeMethodHandle Structure

    System.RuntimeTypeHandle Structure

    System.Net.Sockets.SelectMode Enum






    System.Net.Sockets.SocketFlags Enum

    System.Net.Sockets.SocketOptionLevel Enum

    System.Net.Sockets.SocketOptionName Enum



    System.Net.Sockets.SocketShutdown Enum

    System.Net.Sockets.SocketType Enum





    System.Net.TransportType Enum

    System.Reflection.TypeAttributes Enum



    System.UIntPtr Structure


    System.UnhandledExceptionEventHandler Delegate

    System.Runtime.InteropServices.UnmanagedType Enum




    System.UriHostNameType Enum

    System.UriPartial Enum

    System.Void Structure



    System.Net.WebExceptionStatus Enum







    System.Xml.WhitespaceHandling Enum

    System.Xml.WriteState Enum





    System.Xml.XmlNodeType Enum




    System.Xml.XmlSpace Enum





Annotations Index.



Untitled Document This book is intended for anyone building applications using the .NET Framework. It is meant to be a dictionary-style reference to the core types in the Framework.

The .NET Framework is huge. The amount of time that would be required limits our ability to cover the entire .NET Framework in the depth it deserves. As a result, we have focused the scope of this book on the most important, widely used types in the Framework. Luckily, such a subset was already created in the standardization process of the Common Language Runtime and the C# Programming Language. This book covers the second half of that subset (Volume 1 covered the first half). In the printed portion of this volume you will find all the type-level information for these types. Both the type-level information and member-level information are available in electronic form on the CD.

To make the standard more accessible, this book includes the following features:

  • Annotations from key folks involved in the design of the .NET Framework
  • Namespace overviews
  • Type descriptions
  • Sample code to illustrate type uses
  • A fully searchable CD that includes all source code, descriptions, annotations, and examples
  • These features not only bring the standard to life, but more importantly, they serve as a convenient, informative reference to the most used types in the .NET Framework.

The Standard

At the Professional Developer's Conference in October 2001, Microsoft, in partnership with HP and Intel, began the ECMA standardization process of three core parts of its new developer platform: the Common Language Infrastructure (CLI), the C# programming language, and a subset of the .NET Framework that is included in the CLI and referenced in the C# specification.

The CLI and the C# programming language are covered in other books in this series. Jim Miller's The Common Language Infrastructure Annotated Standard (Addison-Wesley, 2004) covers the CLI, which includes the metadata file format, IL Instruction set, and the type system. The C# Programming Language (Addison-Wesley, 2004) by Anders Hejlsberg, Scott Wiltamuth, and Peter Golde covers the C# programming language specification.

This book covers the second half of the .NET Framework as standardized in ECMA 335 and ISO 23271. The standards break the .NET Framework into seven different libraries to allow conformant implementations in resource-constrained environments. Those libraries are as follows:

Base Class Library--A simple runtime library for modern programming languages. It serves as the standard for the runtime library for the language C#, as well as one of the CLI standard libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom attributes, security attributes, string manipulation, formatting, streams, collections, and so forth.

Extended Numerics Library--Provides the support for floating-point (System.Single, System.Double) and extended-precision (System.Decimal) data types. Like the Base Class Library, this library is directly referenced by the C# standard.

Network Library--Provides simple networking services, including direct access to network ports and HTTP support.

Reflection Library--Provides the ability to examine the structure of types, create instances of types, and invoke methods on types, all based on a description of the type.

XML Library--Provides a simple "pull-style" parser for XML. It is designed for resource-constrained devices, yet provides a simple user model.

Runtime Infrastructure Library--Provides the services needed by a compiler to target the CLI and the facilities needed to dynamically load types from a stream in the file format specified. For example, it provides System.BadImageFormatException, which is thrown when a stream that does not have the correct format is loaded.

Extended Array Library--Provides support for non-vector arrays, that is, arrays that have more than one dimension and arrays that have non-zero lower bounds.

The first volume of the .NET Framework Standard Library Reference covered the Base Class Library, the Extended Numerics Library and the Extended Array Library. This volume will contain the remaining libraries, as well as Microsoft-specific members on those types.

Namespace Overviews

To facilitate reader understanding, we provide an overview of each namespace we cover that describes the functionality and the inheritance hierarchy of types defined in that namespace. At the end of the namespace overview section we include a complete inheritance hierarchy for all the types covered in this volume. In the diagrams we differentiate the various kinds of types that make up the framework.

Type Chapters
Types are described in their own chapters, which are organized alphabetically by type name.

The header contains the namespace name (1), the type name (2), and the library name from the ECMA\ISO Standard (3).

Type Hierarchy
Under the header we include a diagram representing the full inheritance hierarchy for this type (1), subclasses of this type found in this volume (2), and any interfaces they implement (3). The type being described is shown with a gray background (4).

Type Summary
This section contains the C# declaration syntax for all members defined on this type. It is meant to provide a quick reference in a very familiar format to what is in the type. In this summary we highlight certain attributes of these members.

CF Indicates the member is not available in the .NET Compact Framework. If not included the member is available.
MS Indicates that the member is not included in the ECMA\ISO standard.
1.1 Indicates that the member is new in V1.1 of the .NET Framework.

Type Description
This section contains a detailed description of how this type is to be used. For the most part this text is taken directly from the standard.

Throughout this section we provide annotations from key members of the design team at Microsoft and members of the ECMA standardization committee. The comments in this section vary widely, and include notes on everything from common issues to the history of the class design or standardization process to areas where, in retrospect, the designers feel they could have done better.

Here's an example of an annotation from Brad Abrams on the AppDomain class. Each annotation is attributed to individuals by their initials.

We introduced Application Domains as a lightweight process mechanism. Because managed code can be verifiably type safe (memory safe) we did not need the heavyweight address space barrier that processes provide. This savings works out well most of the time. However, when using interop with unmanaged code it does cause some problems when type safety is violated. One notable example of this is the loader-lock and AppDomain marshaling problem that C++ was succeptible to. We fixed this problem in a service pack of v1.1.

Type Examples
In this section we provide sample code illustrating use of the type. Some samples are from the standard, but we added many more to facilitate a deeper and quicker understanding of the use of the type. All the samples we provide are fully compilable programs (1) and include selected output (2).

All of these samples have been tested with V1.0 and V1.1 of the .NET Framework and the appropriate ones have been tested on the .NET Compact Framework.

Complete source code for the samples is available on the CD that is included in the back of the book.

Type Members
The detailed descriptions of the members are included in the electronic version of the book on the CD. To facilitate easy look-ups, the member descriptions appear in the same order as the type summary sections. Each member contains some or all of the following fields:

Syntax--C# declaration syntax is provided for familiar reference. ILASM syntax is provided for completeness.
Summary--Short description of the member's purpose.
Parameters--Table of parameters accepted by this member and their meaning.
Description--A complete description of this member.
Return Value--The value and range returned by this method.
Property Value--The value of this property.
Exceptions--Table of the common exceptions thrown by this member.
Permissions--Table of the code access permissions demanded by this method.
Example--An example using this member following the same pattern as the type samples.

Conventions Used in This Book

Courier is used for all source code blocks, including syntax declarations, class names, and member names.

In order to aid readability, the namespace portion of the fully qualified type names were removed when the result was unambigous. The following guidelines were used:

  • When referring to a member of the type being addressed, only the member names were used.
  • When referring to a type, other than the one being addressed, but in the same namespace, only the type name is used.

Additional Features

In addition to including the content from the ISO CLI standard, this book includes a number of other features
  • For every type covered in the book we include all the members as defined in V1.1 of the .NET Framework. Many members were left out of the ECMA standard to streamline platform work because types in the signature were not in the standard or because of scheduling reasons. As this book is primarily targeted at developers using the .NET Framework, we elected to include all the members of the types we cover, not just those that are standardized.
  • Nearly every type contains annotations from key members of the design team at Microsoft and members of the ECMA standards group. These annotations bring rationale, history, and other interesting notes about the types covered.
  • We added more than 1,000 samples to the book. Nearly every member has a working sample with output included. All of the samples can be found on the CD.


Many people contributed to making this book possible. We would like to thank:

  • Martin Heller, series editor, for his technical guidance as well as coordinating a myriad of details involved in creating the book.
  • Joan Murray from Addison-Wesley for her patience and guidance.
  • David Platt for producing the excellent namespace overviews provided here.
  • Joel Marcey for providing technical support in working with the Xml doc format used in the ECMA standard and for providing thoughtful and lighthearted annotations.
  • The contributing members of ECMA TC-39 TG1 and TG2 for formalizing the CLI and C# Standards on which this book is based.
  • Mike Koenig, my manager here at Microsoft, for allowing me the time to contribute this work.
  • Alex Homer, Kevin Westhead, and Joel Marcey for sharing their coding expertise through the large set of samples shown in this book.
  • The many .NET developers who reviewed early versions of the manuscript and provided valuable feedback, including William Bartholomew, Alfred Meyers, Jordan Matthiesen, Kevin Westhead, and Bill Wagner.

Brad Abrams
Lead Program Manager, .NET Framework Team
Microsoft Corporation
March 2005


Download the Foreword file related to this title.


Download the Index file related to this title.


Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020