You are previewing Applied Microsoft® .NET Framework Programming.
O'Reilly logo
Applied Microsoft® .NET Framework Programming

Book Description

Find out all about the .NET Framework common language runtime and learn how to leverage its power to build, package, and deploy any kind of application or component with this book—ideal for anyone who understands object-oriented programming concepts.

Table of Contents

  1. Applied Microsoft® Windows® .NET Framework Programming
    1. Reviewer Acclaim for Jeffrey Richter and Applied Microsoft .NET Framework Programming
    2. Acknowledgments
    3. Introduction
      1. What Makes Up the Microsoft .NET Initiative
        1. An Underlying Operating System: Windows
        2. Helpful Products: The .NET Enterprise Servers
        3. Microsoft XML Web Services: .NET My Services
        4. The Development Platform: The .NET Framework
        5. The Development Environment: Visual Studio .NET
      2. Goal of This Book
      3. System Requirements
      4. This Book Has No Mistakes
      5. Support
    4. I. Basics of the Microsoft .NET Framework
      1. 1. The Architecture of the .NET Framework Development Platform
        1. Compiling Source Code into Managed Modules
        2. Combining Managed Modules into Assemblies
        3. Loading the Common Language Runtime
        4. Executing Your Assembly’s Code
          1. IL and Verification
        5. The .NET Framework Class Library
        6. The Common Type System
        7. The Common Language Specification
        8. Interoperability with Unmanaged Code
      2. 2. Building, Packaging, Deploying, and Administering Applications and Types
        1. .NET Framework Deployment Goals
        2. Building Types into a Module
        3. Combining Modules to Form an Assembly
          1. Adding Assemblies to a Project Using the Visual Studio .NET IDE
          2. Using the Assembly Linker
          3. Including Resource Files in the Assembly
        4. Assembly Version Resource Information
          1. Version Numbers
        5. Culture
        6. Simple Application Deployment (Privately Deployed Assemblies)
        7. Simple Administrative Control (Configuration)
      3. 3. Shared Assemblies
        1. Two Kinds of Assemblies, Two Kinds of Deployment
        2. Giving an Assembly a Strong Name
        3. The Global Assembly Cache
          1. The Internal Structure of the GAC
        4. Building an Assembly That References a Strongly Named Assembly
        5. Strongly Named Assemblies Are Tamper-Resistant
        6. Delayed Signing
        7. Privately Deploying Strongly Named Assemblies
        8. Side-by-Side Execution
        9. How the Runtime Resolves Type References
        10. Advanced Administrative Control (Configuration)
          1. Publisher Policy Control
        11. Repairing a Faulty Application
    5. II. Working with Types and the Common Language Runtime
      1. 4. Type Fundamentals
        1. All Types Are Derived from System.Object
        2. Casting Between Types
          1. Casting with the C# is and as Operators
        3. Namespaces and Assemblies
      2. 5. Primitive, Reference, and Value Types
        1. Programming Language Primitive Types
          1. Checked and Unchecked Primitive Type Operations
        2. Reference Types and Value Types
        3. Boxing and Unboxing Value Types
      3. 6. Common Object Operations
        1. Object Equality and Identity
          1. Implementing Equals for a Reference Type Whose Base Classes Don’t Override Object’s Equals
          2. Implementing Equals for a Reference Type When One or More of Its Base Classes Overrides Object’s Equals
          3. Implementing Equals for a Value Type
          4. Summary of Implementing Equals and the ==/!= Operators
          5. Identity
        2. Object Hash Codes
        3. Object Cloning
    6. III. Designing Types
      1. 7. Type Members and Their Accessibility
        1. Type Members
        2. Accessibility Modifiers and Predefined Attributes
          1. Type Predefined Attributes
          2. Field Predefined Attributes
          3. Method Predefined Attributes
      2. 8. Constants and Fields
        1. Constants
        2. Fields
      3. 9. Methods
        1. Instance Constructors
        2. Type Constructors
        3. Operator Overload Methods
          1. Operators and Programming Language Interoperability
        4. Conversion Operator Methods
        5. Passing Parameters by Reference to a Method
        6. Passing a Variable Number of Parameters to a Method
        7. How Virtual Methods Are Called
        8. Virtual Method Versioning
      4. 10. Properties
        1. Parameterless Properties
        2. Parameterful Properties
      5. 11. Events
        1. Designing a Type That Exposes an Event
        2. Designing a Type That Listens for an Event
        3. Explicitly Controlling Event Registration
        4. Designing a Type That Defines Lots of Events
        5. Designing the EventHandlerSet Type
    7. IV. Essential Types
      1. 12. Working with Text
        1. Characters
        2. The System.String Type
          1. Constructing Strings
          2. Strings Are Immutable
          3. Comparing Strings
          4. String Interning
          5. String Pooling
          6. Examining a String’s Characters
          7. Other String Operations
        3. Dynamically Constructing a String Efficiently
          1. Constructing a StringBuilder Object
          2. StringBuilder’s Members
        4. Obtaining a String Representation for an Object
          1. Specific Formats and Cultures
          2. Formatting Multiple Objects into a Single String
          3. Providing Your Own Custom Formatter
        5. Parsing a String to Obtain an Object
        6. Encodings: Converting Between Characters and Bytes
          1. Encoding/Decoding Streams of Characters and Bytes
          2. Base-64 String Encoding and Decoding
      2. 13. Enumerated Types and Bit Flags
        1. Enumerated Types
        2. Bit Flags
      3. 14. Arrays
        1. All Arrays Are Implicitly Derived from System.Array
        2. Casting Arrays
        3. Passing and Returning Arrays
        4. Creating Arrays That Have a Nonzero Lower Bound
        5. Fast Array Access
        6. Redimensioning an Array
      4. 15. Interfaces
        1. Interfaces and Inheritance
        2. Designing an Application That Supports Plug-In Components
        3. Changing Fields in a Boxed Value Type Using Interfaces
        4. Implementing Multiple Interfaces That Have the Same Method
        5. Explicit Interface Member Implementations
      5. 16. Custom Attributes
        1. Using Custom Attributes
        2. Defining Your Own Attribute
        3. Attribute Constructor and Field/Property Data Types
        4. Detecting the Use of a Custom Attribute
        5. Matching Two Attribute Instances Against Each Other
        6. Pseudo-Custom Attributes
      6. 17. Delegates
        1. A First Look at Delegates
        2. Using Delegates to Call Back Static Methods
        3. Using Delegates to Call Back Instance Methods
        4. Demystifying Delegates
        5. Some Delegate History: System.Delegate and System.MulticastDelegate
        6. Comparing Delegates for Equality
        7. Delegate Chains
        8. C#’s Support for Delegate Chains
        9. Having More Control over Invoking a Delegate Chain
        10. Delegates and Reflection
    8. V. Managing Types
      1. 18. Exceptions
        1. The Evolution of Exception Handling
        2. The Mechanics of Exception Handling
          1. The try Block
          2. The catch Block
          3. The finally Block
        3. What Exactly Is an Exception?
        4. The System.Exception Class
        5. FCL-Defined Exception Classes
        6. Defining Your Own Exception Class
        7. How to Use Exceptions Properly
          1. You Can’t Have Too Many finally Blocks
          2. Don’t Catch Everything
          3. Gracefully Recovering from an Exception
          4. Backing Out of a Partially Completed Operation When an Unrecoverable Exception Occurs
          5. Hiding an Implementation Detail
        8. What’s Wrong with the FCL
        9. Performance Considerations
        10. Catch Filters
        11. Unhandled Exceptions
          1. Controlling What the CLR Does When an Unhandled Exception Occurs
          2. Unhandled Exceptions and Windows Forms
          3. Unhandled Exceptions and ASP.NET Web Forms
          4. Unhandled Exceptions and ASP.NET XML Web Services
        12. Exception Stack Traces
          1. Remoting Stack Traces
        13. Debugging Exceptions
          1. Telling Visual Studio What Kind of Code to Debug
      2. 19. Automatic Memory Management (Garbage Collection)
        1. Understanding the Basics of Working in a Garbage-Collected Platform
        2. The Garbage Collection Algorithm
        3. Finalization
          1. What Causes Finalize Methods to Get Called
          2. Finalization Internals
        4. The Dispose Pattern: Forcing an Object to Clean Up
          1. Using a Type That Implements the Dispose Pattern
          2. C#’s using Statement
          3. An Interesting Dependency Issue
        5. Weak References
          1. Weak Reference Internals
        6. Resurrection
          1. Designing an Object Pool Using Resurrection
        7. Generations
        8. Programmatic Control of the Garbage Collector
        9. Other Garbage Collector Performance Issues
          1. Synchronization-Free Allocations
          2. Scalable Parallel Collections
          3. Concurrent Collections
          4. Large Objects
        10. Monitoring Garbage Collections
      3. 20. CLR Hosting, AppDomains, and Reflection
        1. Metadata: The Cornerstone of the .NET Framework
        2. CLR Hosting
        3. AppDomains
          1. Accessing Objects Across AppDomain Boundaries
          2. AppDomain Events
          3. Applications and How They Host the CLR and Manage AppDomains
            1. Console and Windows Forms Applications
            2. ASP.NET Web Forms and XML Web Services Applications
            3. Microsoft Internet Explorer
          4. "Yukon"
        4. The Gist of Reflection
        5. Reflecting Over an Assembly’s Types
        6. Reflecting Over an AppDomain’s Assemblies
        7. Reflecting Over a Type’s Members: Binding
        8. Explicitly Loading Assemblies
          1. Loading Assemblies as "Data Files"
          2. Building a Hierarchy of Exception-Derived Types
        9. Explicitly Unloading Assemblies: Unloading an AppDomain
        10. Obtaining a Reference to a System.Type Object
        11. Reflecting Over a Type’s Members
          1. Creating an Instance of a Type
          2. Calling a Type’s Method
          3. Bind Once, Invoke Multiple Times
        12. Reflecting Over a Type’s Interfaces
        13. Reflection Performance
    9. A. Jeffrey Richter
    10. B. Gyroscopic Artificial Horizon
    11. Index