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
Reference Types As Value and Reference Parameters
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
Automatically Implemented Properties
Example of a Static Constructor
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
Masking 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
Packaging the Use of a Resource
Example of the using Statement
Multiple Resources and Nesting
Another Form of the using Statement
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 or 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
Overview of Source Code Components
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 Interfaces
Chapter 18: Enumerators and Iterators
Enumerators and Enumerable Types
Example Using IEnumerable and IEnumerator
The Generic Enumeration Interfaces
Using an Iterator to Create an Enumerator
Using an Iterator to Create an Enumerable
Producing Multiple Enumerables
Behind the Scenes with Iterators
Chapter 19: Introduction to LINQ
Method Syntax and Query Syntax
The Structure of Query Expressions
The from . . . let . . . where Section in the Query Body
Query Continuation: The into Clause
Signatures of the Standard Query Operators
Query Expressions and the Standard Query Operators
The LINQ Predefined Delegate Types
Example Using a Delegate Parameter
Example Using a Lambda Expression Parameter
Using LINQ Queries with LINQ to XML
Chapter 20: Introduction to Asynchronous Programming
The Structure of the async/await Feature
The Flow of Control in an Async Method
Exception Handling and the await Expression
Waiting Synchronously for Tasks in the Calling Method
Waiting Asynchronously for Tasks in the async Method
Async Operations in GUI Programs
Using an async Lambda Expression
Example of the BackgroundWorker Class in a WPF Program
Other Asynchronous Programming Patterns
Chapter 21: 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
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
The Caller Information Attributes
The DebuggerStepThrough Attribute
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
Inserting Documentation Comments
Destructors and the Dispose Pattern
3.144.232.189