Chapter 1: C# and the .NET Framework
Windows Programming in the Late 1990s
Goals for the Next-Generation Platform Services
Components of the .NET Framework
An Improved Programming Environment
Compiling to the Common Intermediate Language
Compiling to Native Code and Execution
Overview of Compilation and Execution
The Common Language Infrastructure
Chapter 2: Overview of C# Programming
Main: The Starting Point of a Program
Chapter 3: Types, Storage, and Variables
A C# Program Is a Set of Type Declarations
Data Members and Function Members
More About the Predefined Types
Value Types and Reference Types
Storing Members of a Reference Type Object
Multiple-Variable Declarations
Static Typing and the dynamic Keyword
Chapter 4: Classes: The Basics
A Class Is an Active Data Structure
Programs and Classes: A Quick Example
Creating Variables and Instances of a Class
Allocating Memory for the Data
Accessing Members from Inside the Class
Accessing Members from Outside the Class
Code Execution in the Method Body
Type Inference and the var Keyword
Local Variables Inside Nested Blocks
The Return Statement and Void Methods
Accessing Static Members from Outside the Class
Other Static Class Member Types
Property Declarations and Accessors
Properties and Associated Fields
Read-Only and Write-Only Properties
An Example of a Computed, Read-Only Property
Example of Properties and Databases
Automatically Implemented Properties
Example of a Static Constructor
Comparing Constructors and Destructors
Declaring the Indexer for the Employee Example
Partial Classes and Partial Types
Chapter 7: Classes and Inheritance
Accessing the Inherited Members
All Classes Are Derived from Class object
Hiding Members of a Base Class
Using References to a Base Class
Overriding a Method Marked override
Inheritance Between Assemblies
Protected Member Accessibility
Protected Internal Member Accessibility
Summary of Member Access Modifiers
Example of an Abstract Class and an Abstract Method
Another Example of an Abstract Class
Chapter 8: Expressions and Operators
Relational and Equality Comparison Operators
Comparison and Equality Operations
Increment and Decrement Operators
Explicit Conversion and the Cast Operator
Restrictions on Operator Overloading
Example of Operator Overloading
The Scope of Variables in a for Statement
Multiple Expressions in the Initializer and Iteration Expression
The Scope of Labeled Statements
The goto Statement Inside a switch Statement
Example of the using Statement
Multiple Resources and Nesting
Another Form of the using Statement
Chapter 10: Namespaces and Assemblies
Namespaces Spread Across Files
Creating a Strongly Named Assembly
Private Deployment of an Assembly
Installing Assemblies into the GAC
Side-by-Side Execution in the GAC
Examples Using Specific catch Clauses
Finding a Handler for an Exception
Example of Searching Down the Call Stack
Throwing Without an Exception Object
Summary of Constructors and Destructors
Field Initializers Are Not Allowed
Structs As Return Values and Parameters
Additional Information About Structs
Setting the Underlying Type and Explicit Values
One-Dimensional and Rectangular Arrays
Declaring a One-Dimensional Array or a Rectangular Array
Instantiating a One-Dimensional or Rectangular Array
Explicit Initialization of One-Dimensional Arrays
Explicit Initialization of Rectangular Arrays
Syntax Points for Initializing Rectangular Arrays
Comparing Rectangular and Jagged Arrays
The Iteration Variable Is Read-Only
The foreach Statement with Multidimensional Arrays
Useful Inherited Array Members
Removing Methods from a Delegate
Invoking Delegates with Return Values
Invoking Delegates with Reference Parameters
Scope of Variables and Parameters
An Event Has a Private Delegate
Overview of Source Code Components
The Delegate Type and EventHandler
Passing Data by Extending EventArgs
Example Using the IComparable Interface
Example with a Simple Interface
An Interface Is a Reference Type
Using the as Operator with Interfaces
Implementing Multiple Interfaces
Implementing Interfaces with Duplicate Members
References to Multiple Interfaces
An Inherited Member As an Implementation
Explicit Interface Member Implementations
Accessing Explicit Interface Member Implementations
Interfaces Can Inherit Interfaces
Example of Different Classes Implementing an Interface
Explicit Conversions and Casting
Implicit Reference Conversions
Explicit Reference Conversions
Valid Explicit Reference Conversions
Constraints on User-Defined Conversions
Example of a User-Defined Conversion
Evaluating User-Defined Conversions
Example of a Multistep User-Defined Conversion
Continuing with the Stack Example
Creating Variables and Instances
The Stack Example Using Generics
Comparing the Generic and Nongeneric Stack
Constraints on Type Parameters
Extension Methods with Generic Classes
Another Generic Delegate Example
An Example Using Generic Interfaces
Generic Interface Implementations Must Be Unique
Covariance and Contravariance in Generics
Covariance and Contravariance in Interfaces
Chapter 20: Enumerators and Iterators
Enumerators and Enumerable Types
Using the IEnumerator Interface
Declaring an IEnumerator Enumerator
Example Using IEnumerable and IEnumerator
The Generic Enumeration Interfaces
Using an Iterator to Create an Enumerator
Using an Iterator to Create an Enumerable
Producing Enumerables and Enumerators
Producing Multiple Enumerables
Producing Multiple Enumerators
Behind the Scenes with Iterators
Chapter 21: Introduction to LINQ
Query Syntax and Method Syntax
The Structure of Query Expressions
The from . . . let . . . where Section in the Query Body
Query Expressions and the Standard Query Operators
Signatures of the Standard Query Operators
The LINQ Predefined Delegate Types
Example Using a Delegate Parameter
Example Using a Lambda Expression Parameter
Using Values from the XML Tree
Using LINQ Queries with LINQ to XML
Chapter 22: Introduction to Asynchronous Programming
Processes, Threads, and Asynchronous Programming
The Complexity of Multithreading
Example Code Using the BackgroundWorker Class
Example of the BackgroundWorker Class in a WPF Program
Asynchronous Programming Patterns
Chapter 23: Preprocessor Directives
What Are Preprocessor Directives?
The #define and #undef Directives
The Conditional Compilation Constructs
Chapter 24: Reflection and Attributes
Predefined, Reserved Attributes
More About Applying Attributes
Positional and Named Parameters in Constructors
Restricting the Usage of an Attribute
Suggested Practices for Custom Attributes
Using the GetCustomAttributes Method
Parsing Strings to Data Values
Using Nullable User-Defined Types
52.15.214.27