Part I CLR Basics
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
IL and Verification
Unsafe 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
2 Building, Packaging, Deploying, and Administering Applications and Types
.NET Framework Deployment Goals
Building Types into a Module
Response Files
A Brief Look at Metadata
Combining Modules to Form an Assembly
Adding Assemblies to a Project by Using the Visual Studio IDE
Using the Assembly Linker
Including Resource Files in the Assembly
Assembly Version Resource Information
Version Numbers
Culture
Simple Application Deployment(Privately Deployed Assemblies)
Simple Administrative Control(Configuration)
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
The Internal Structure of the GAC
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)
Publisher Policy Control
Part II Working with Types
4 Type Fundamentals
All Types Are Derived from System.Object
Casting Between Types
Casting with the C# is and as Operators
Namespaces and Assemblies
How Things Relate at Run Time
5 Primitive, Reference, and Value Types
Programming Language Primitive Types
Checked and Unchecked Primitive Type Operations
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
Part III Designing Types
6 Type and Member Basics
The Different Kinds of Type Members
Type Visibility
Friend Assemblies
Member Accessibility
Static Classes
Partial Classes, Structures, and Interfaces
Components, Polymorphism, and Versioning
How the CLR Calls Virtual Methods, Properties, and Events
Using Type Visibility and Member Accessibility Intelligently
Dealing with Virtual Methods when Versioning Types
7 Constants and Fields
Constants
Fields
8 Methods: Constructors, Operators, Conversions, and Parameters
Instance Constructors and Classes(Reference Types)
Instance Constructors and Structures(Value Types)
Type Constructors
Type Constructor Performance
Operator Overload Methods
Operators and Programming Language Interoperability
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
9 Properties
Parameterless Properties
Defining Properties Intelligently
Parameterful Properties
The Performance of Calling Property Accessor Methods
Property Accessor Accessibility
Generic Property Accessor Methods
10 Events
Designing a Type That Exposes an Event
Step #1: Define a type that will hold any additional information that should be sent to receivers of the event notification
Step #2: Define the event member
Step #3: Define a method responsible for raising the event to notify registered objects that the event has occurred
Step #4: Define a method that translates the input into the desired 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
Part IV Essential Types
11 Chars, Strings, and Working with Text
12 Enumerated Types and Bit Flags
13 Arrays
14 Interfaces
15 Delegates
16 Generics
17 Custom Attributes
18 Nullable Value Types
19 Exceptions
20 Automatic Memory Management(Garbage Collection)
21 CLR Hosting and AppDomains
22 Assembly Loading and Reflection
23 Performing Asynchronous Operations
24 Thread Synchronization
Index