Publisher: Microsoft Press Released: March 2006 Pages: 736
Dig deep and master the intricacies of the common language runtime (CLR) and the .NET Framework. Written by a highly regarded programming expert and consultant to the Microsoft .NET team, this guide is ideal for developers building any kind of application—including Microsoft ASP.NET, Windows Forms, Microsoft SQL Server, Web services, and console applications. You’ll get hands-on instruction and extensive code C# code samples to help you tackle the tough topics and develop high-performance applications. Discover how to: - Build, deploy, administer, and version applications, components, and shared assemblies
- Design types using constants, fields, constructors, methods, properties, and events
- Work effectively with the CLR’s special types including enumerators, arrays, and strings
- Declare, create, and use delegates to expose callback functions
- Define and employ re-usable algorithms with interfaces and generics
- Define, use, and detect custom attributes
- Use exception handling to build robust, reliable, and security-enhanced components
- Manage memory automatically with the garbage collector and work with native resources
- Apply CLR Hosting, AppDomains, assembly loading, and reflection to build dynamically extensible applications
PLUS—Get code samples on the Web |
-
CLR Basics -
Chapter 1 The CLR's Execution Model - Compiling Source Code into Managed Modules
- Combining Managed Modules into Assemblies
- Loading the Common Language Runtime
- Executing Your Assembly's Code
- The Native Code Generator Tool: NGen.exe
- Introducing the Framework Class Library
- The Common Type System
- The Common Language Specification
- Interoperability with Unmanaged Code
-
Chapter 2 Building, Packaging, Deploying, and Administering Applications and Types - .NET Framework Deployment Goals
- Building Types into a Module
- A Brief Look at Metadata
- Combining Modules to Form an Assembly
- Assembly Version Resource Information
- Culture
- Simple Application Deployment (Privately Deployed Assemblies)
- Simple Administrative Control (Configuration)
-
Chapter 3 Shared Assemblies and Strongly Named Assemblies - Two Kinds of Assemblies, Two Kinds of Deployment
- Giving an Assembly a Strong Name
- The Global Assembly Cache
- Building an Assembly that References a Strongly Named Assembly
- Strongly Named Assemblies Are Tamper-Resistant
- Delayed Signing
- Privately Deploying Strongly Named Assemblies
- How the Runtime Resolves Type References
- Advanced Administrative Control (Configuration)
-
Working with Types -
Chapter 4 Type Fundamentals - All Types Are Derived from System.Object
- Casting Between Types
- Namespaces and Assemblies
- How Things Relate at Run Time
-
Chapter 5 Primitive, Reference, and Value Types - Programming Language Primitive Types
- Reference Types and Value Types
- Boxing and Unboxing Value Types
- Changing Fields in a Boxed Value Type by Using Interfaces (And Why You Shouldn't Do This)
- Object Equality and Identity
- Object Hash Codes
-
Designing Types -
Chapter 6 Type and Member Basics - The Different Kinds of Type Members
- Type Visibility
- Member Accessibility
- Static Classes
- Partial Classes, Structures, and Interfaces
- Components, Polymorphism, and Versioning
-
Chapter 7 Constants and Fields - Constants
- Fields
-
Chapter 8 Methods: Constructors, Operators, Conversions, and Parameters - Instance Constructors and Classes (Reference Types)
- Instance Constructors and Structures (Value Types)
- Type Constructors
- Operator Overload Methods
- Conversion Operator Methods
- Passing Parameters by Reference to a Method
- Passing a Variable Number of Arguments to a Method
- Declaring a Method's Parameter Types
- Constant Methods and Parameters
-
Chapter 9 Properties - Parameterless Properties
- Parameterful Properties
- The Performance of Calling Property Accessor Methods
- Property Accessor Accessibility
- Generic Property Accessor Methods
-
Chapter 10 Events - Designing a Type That Exposes an Event
- How Events Are Implemented
- Designing a Type That Listens for an Event
- Events and Thread Safety
- Explicitly Controlling Event Registration and Unregistration
- Designing a Type That Defines Lots of Events
-
Essential Types -
Chapter 11 Chars, Strings, and Working with Text - Characters
- The System.String Type
- Dynamically Constructing a String Efficiently
- Obtaining a String Representation of an Object
- Parsing a String to Obtain an Object
- Encodings: Converting Between Characters and Bytes
- Encoding/Decoding Streams of Characters and Bytes
- Secure Strings
-
Chapter 12 Enumerated Types and Bit Flags - Enumerated Types
- Bit Flags
-
Chapter 13 Arrays - Casting Arrays
- All Arrays Are Implicitly Derived from System.Array
- All Arrays Implicitly Implement IEnumerable, ICollection, and IList
- Passing and Returning Arrays
- Creating Non-Zero–Lower Bound Arrays
- Array Access Performance
- Unsafe Array Access and Fixed-Size Array
-
Chapter 14 Interfaces - Class and Interface Inheritance
- Defining an Interface
- Inheriting an Interface
- More About Calling Interface Methods
- Implicit and Explicit Interface Method Implementations (What's Happening Behind the Scenes)
- Generic Interfaces
- Generics and Interface Constraints
- Implementing Multiple Interfaces That Have the Same Method Name and Signature
- Improving Compile-Time Type Safety with Explicit Interface Method Implementations
- Be Careful with Explicit Interface Method Implementations
- Design: Base Class or Interface?
-
Chapter 15 Delegates - A First Look at Delegates
- Using Delegates to Call Back Static Methods
- Using Delegates to Call Back Instance Methods
- Demystifying Delegates
- Using Delegates to Call Back Many Methods (Chaining)
- C#'s Syntactical Sugar for Delegates
- Delegates and Reflection
-
Chapter 16 Generics - Generics in the Framework Class Library
- Wintellect's Power Collections Library
- Generics Infrastructure
- Generic Interfaces
- Generic Delegates
- Generic Methods
- Generics and Other Members
- Verifiability and Constraints
-
Chapter 17 Custom Attributes - Using Custom Attributes
- Defining Your Own Attribute Class
- Attribute Constructor and Field/Property Data Types
- Detecting the Use of a Custom Attribute
- Matching Two Attribute Instances Against Each Other
- Detecting the Use of a Custom Attribute Without Creating Attribute-Derived Objects
- Conditional Attribute Classes
-
Chapter 18 Nullable Value Types - C#'s Support for Nullable Value Types
- C#'s Null-Coalescing Operator
- The CLR Has Special Support for Nullable Value Types
-
CLR Facilities -
Chapter 19 Exceptions - The Evolution of Exception Handling
- The Mechanics of Exception Handling
- Common Language Specification (CLS) and Non-CLS Exceptions
- What Exactly Is an Exception?
- The System.Exception Class
- FCL-Defined Exception Classes
- Throwing an Exception
- Defining Your Own Exception Class
- How to Use Exceptions Properly
- Performance Considerations
- Unhandled Exceptions
- Exception Stack Traces
- Debugging Exceptions
-
Chapter 20 Automatic Memory Management (Garbage Collection) - Understanding the Basics of Working in a Garbage-Collected Platform
- The Garbage Collection Algorithm
- Garbage Collections and Debugging
- Using Finalization to Release Native Resources
- Using Finalization with Managed Resources
- What Causes Finalize Methods to Be Called
- Finalization Internals
- The Dispose Pattern: Forcing an Object to Clean Up
- Using a Type That Implements the Dispose Pattern
- C#'s using Statement
- An Interesting Dependency Issue
- Manually Monitoring and Controlling the Lifetime of Objects
- Resurrection
- Generations
- Other Garbage Collection Features for Use with Native Resources
- Predicting the Success of an Operation that Requires a Lot of Memory
- Programmatic Control of the Garbage Collector
- Other Garbage Collector Performance Topics
- Monitoring Garbage Collections
-
Chapter 21 CLR Hosting and AppDomains - CLR Hosting
- AppDomains
- AppDomain Unloading
- How Hosts Use AppDomains
- Advanced Host Control
-
Chapter 22 Assembly Loading and Reflection - Assembly Loading
- Using Reflection to Build a Dynamically Extensible Application
- Reflection Performance
- Designing an Application That Supports Add-Ins
- Using Reflection to Discover a Type's Members
-
Chapter 23 Performing Asynchronous Operations - How the CLR Uses Windows Threads
- Pontificating about Efficient Thread Usage
- Introducing the CLR's Thread Pool
- Limiting the Number of Threads in the Thread Pool
- Using the Thread Pool to Perform an Asynchronous Compute-Bound Operation
- Using a Dedicated Thread to Perform an Asynchronous Compute-Bound Operation
- Periodically Performing an Asynchronous Compute-Bound Operation
- Introducing the Asynchronous Programming Model
- Using the APM to Perform an Asynchronous I/O-Bound Operation
- The APM's Three Rendezvous Techniques
- Using the APM to Perform an Asynchronous Compute-Bound Operation
- The APM and Exceptions
- Important Notes about the APM
- Execution Contexts
-
Chapter 24 Thread Synchronization - Memory Consistency, Volatile Memory Access, and Volatile Fields
- The Interlocked Methods
- The Monitor Class and Sync Blocks
- The ReaderWriterLock Class
- Using Windows Kernel Objects from Managed Code
|
- Title:
- CLR via C#, 2nd Edition
- By:
- Jeffrey Richter
- Publisher:
- Microsoft Press
- Formats:
-
- Print
- Safari Books Online
- Print:
- March 2006
- Pages:
- 736
- Print ISBN:
- 978-0-7356-2163-3
- | ISBN 10:
- 0-7356-2163-2
|
-
Jeffrey Richter Jeffrey Richter is a cofounder of Wintellect (www.wintellect.com)-a training, debugging, and consulting firm dedicated to helping companies build better software faster. He is the author of the previous editions of this book, Windows via C/C++, and several other Windows®-related programming books. Jeffrey has been consulting with the Microsoft® .NET Framework team since October 1999. View Jeffrey Richter's full profile page. |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Online Training Solutions
September 2004
Ebook: $23.99
Print & Ebook: $32.99
Print: $29.99
By Peter Weverka
September 2004
By Hitachi Consulting, Stacia Misner
September 2004
|
Customer Reviews
|
|
|