Special Offers

Applied Microsoft® .NET Framework Programming
Author Jeffrey Richter (Wintellect)
Pages 632
Disk N/A
Level All Levels
Published 01/23/2002
ISBN 9780735614222
Price $49.99
To see this book's discounted price, select a reseller below.

More Information

About the Book
Table of Contents
Sample Chapter
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books


Table of Contents

1   The Architecture of the .NET Framework Development Platform3
    Compiling Source Code into Managed Modules3
    Combining Managed Modules into Assemblies7
    Loading the Common Language Runtime9
    Executing Your Assembly's Code11
        IL and Verification19
    The .NET Framework Class Library21
    The Common Type System24
    The Common Language Specification27
    Interoperability with Unmanaged Code31
2   Building, Packaging, Deploying, and Administering Applications and Types35
    .NET Framework Deployment Goals36
    Building Types into a Module37
    Combining Modules to Form an Assembly45
        Adding Assemblies to a Project Using the Visual Studio .NET IDE52
        Using the Assembly Linker53
        Including Resource Files in the Assembly55
    Assembly Version Resource Information56
        Version Numbers59
    Simple Application Deployment (Privately Deployed Assemblies)63
    Simple Administrative Control (Configuration)64
3   Shared Assemblies71
    Two Kinds of Assemblies, Two Kinds of Deployment72
    Giving an Assembly a Strong Name73
    The Global Assembly Cache79
        The Internal Structure of the GAC85
    Building an Assembly That References a Strongly Named Assembly87
    Strongly Named Assemblies Are Tamper-Resistant89
    Delayed Signing90
    Privately Deploying Strongly Named Assemblies95
    Side-by-Side Execution96
    How the Runtime Resolves Type References98
    Advanced Administrative Control (Configuration)101
        Publisher Policy Control106
    Repairing a Faulty Application109
4   Type Fundamentals115
    All Types Are Derived from System.Object115
    Casting Between Types117
        Casting with the C# is and as Operators119
    Namespaces and Assemblies121
5   Primitive, Reference, and Value Types127
    Programming Language Primitive Types127
        Checked and Unchecked Primitive Type Operations131
    Reference Types and Values Types134
    Boxing and Unboxing Value Types141
6   Common Object Operations153
    Object Equality and Identity153
        Implementing Equals for a Reference Type Whose Base Classes Don't Override Object's Equals154
        Implementing Equals for a Reference Type When One or More of Its Base Classes Overrides Object's Equals156
        Implementing Equals for a Value Type157
        Summary of Implementing Equals and the ==/!= Operators160
    Object Hash Codes162
    Object Cloning164
7   Type Members and Their Accessibility169
    Type Members169
    Accessibility Modifiers and Predefined Attributes173
        Type Predefined Attributes174
        Field Predefined Attributes175
        Method Predefined Attributes175
8   Constants and Fields177
9   Methods181
    Instance Constructors181
    Type Constructors187
    Operator Overload Methods190
        Operators and Programming Language Interoperability193
    Conversion Operator Methods197
    Passing Parameters by Reference to a Method200
    Passing a Variable Number of Parameters to a Method206
    How Virtual Methods Are Called209
    Virtual Method Versioning210
10   Properties215
    Parameterless Properties215
    Parameterful Properties220
11   Events227
    Designing a Type That Exposes an Event228
    Designing a Type That Listens for an Event234
    Explicitly Controlling Event Registration236
    Designing a Type That Defines Lots of Events238
    Designing the EventHandlerSet Type243
12   Working with Text249
    The System.String Type253
        Constructing Strings253
        Strings Are Immutable255
        Comparing Strings256
        String Interning262
        String Pooling266
        Examining a String's Characters266
        Other String Operations270
    Dynamically Constructing a String Efficiently270
        Constructing a StringBuilder Object271
        StringBuilder's Members272
    Obtaining a String Representation for an Object275
        Specific Formats and Cultures276
        Formatting Multiple Objects into a Single String280
        Providing Your Own Custom Formatter282
    Parsing a String to Obtain an Object285
    Encodings: Converting Between Characters and Bytes289
        Encoding/Decoding Streams of Characters and Bytes296
        Base-64 String Encoding and Decoding298
13   Enumerated Types and Bit Flags299
    Enumerated Types299
    Bit Flags305
14   Arrays309
    All Arrays Are Implicitly Derived from System.Array312
    Casting Arrays315
    Passing and Returning Arrays316
    Creating Arrays That Have a Nonzero Lower Bound318
    Fast Array Access319
    Redimensioning an Array323
15   Interfaces325
    Interfaces and Inheritance325
    Designing an Application That Supports Plug-In Components331
    Changing Fields in a Boxed Value Type Using Interfaces333
    Implementing Multiple Interfaces That Have the Same Method336
    Explicit Interface Member Implementations338
16   Custom Attributes345
    Using Custom Attributes345
    Defining Your Own Attribute349
    Attribute Constructor and Field/Property Data Types353
    Detecting the Use of a Custom Attribute354
    Matching Two Attribute Instances Against Each Other359
    Pseudo-Custom Attributes362
17   Delegates365
    A First Look at Delegates365
    Using Delegates to Call Back Static Methods368
    Using Delegates to Call Back Instance Methods370
    Demystifying Delegates371
    Some Delegate History: System.Delegate and System.MulticastDelegate375
    Comparing Delegates for Equality377
    Delegate Chains377
    C#'s Support for Delegate Chains383
    Having More Control over Invoking a Delegate Chain384
    Delegates and Reflection386
18   Exceptions393
    The Evolution of Exception Handling394
    The Mechanics of Exception Handling396
        The try Block397
        The catch Block398
        The finally Block400
    What Exactly Is an Exception?401
    The System.Exception Class406
    FCL-Defined Exception Classes408
    Defining Your Own Exception Class411
    How to Use Exceptions Properly416
        You Can't Have Too Many finally Blocks416
        Don't Catch Everything418
        Gracefully Recovering from an Exception419
        Backing Out of a Partially Completed Operation When an Unrecoverable Exception Occurs420
        Hiding an Implementation Detail421
    What's Wrong with the FCL424
    Performance Considerations426
    Catch Filters429
    Unhandled Exceptions432
        Controlling What the CLR Does When an Unhandled Exception Occurs437
        Unhandled Exceptions and Windows Forms439
        Unhandled Exceptions and ASP.NET Web Forms440
        Unhandled Exceptions and ASP.NET XML Web Services441
    Exception Stack Traces441
        Remoting Stack Traces444
    Debugging Exceptions445
        Telling Visual Studio What Kind of Code to Debug448
19   Automatic Memory Management (Garbage Collection)451
    Understanding the Basics of Working in a Garbage-Collected Platform451
    The Garbage Collection Algorithm455
        What Causes Finalize Methods to Get Called467
        Finalization Internals468
    The Dispose Pattern: Forcing an Object to Clean Up471
        Using a Type That Implements the Dispose Pattern477
        C#'s using Statement482
        An Interesting Dependency Issue484
    Weak References485
        Weak Reference Internals487
        Designing an Object Pool Using Resurrection491
    Programmatic Control of the Garbage Collector499
    Other Garbage Collector Performance Issues501
        Synchronization-Free Allocations503
        Scalable Parallel Collections503
        Concurrent Collections504
        Large Objects505
    Monitoring Garbage Collections506
20   CLR Hosting, AppDomains, and Reflection507
    Metadata: The Cornerstone of the .NET Framework507
    CLR Hosting508
        Accessing Objects Across AppDomain Boundaries513
        AppDomain Events515
        Applications and How They Host the CLR and Manage AppDomains516
    The Gist of Reflection518
    Reflecting Over an Assembly's Types520
    Reflecting Over an AppDomain's Assemblies523
    Reflecting Over a Type's Members: Binding523
    Explicitly Loading Assemblies525
        Loading Assemblies as "Data Files"527
        Building a Hierarchy of Exception-Derived Types529
    Explicitly Unloading Assemblies: Unloading an AppDomain532
    Obtaining a Reference to a System.Type Object534
    Reflecting Over a Type's Members538
        Creating an Instance of a Type541
        Calling a Type's Method543
        Bind Once, Invoke Multiple Times548
    Reflecting Over a Type's Interfaces553
    Reflection Performance555

Last Updated: January 12, 2002
Top of Page