Preface
Parti. The C# Language 1. C# and the .NET Framework
The .NET Platform The .NET Framework Compilation and the MSIL The C# Language
2. Getting Started: "Hello World"
Classes, Objects, and Types
Developing "Hello World"
Using the Visual Studio .NET Debugger
3. C# Language Fundamentals
Types
Variables and Constants
Expressions
Whitespace
Statements
Operators
Namespaces
Preprocessor Directives
4. Classes and Objects
Defining Classes
Creating Objects
Using Static Members
Destroying Objects
Passing Parameters
Overloading Methods and Constructors
Encapsulating Data with Properties
readonly Fields
5. Inheritance and Polymorphism .
Specialization and Generalization
Inheritance
Polymorphism
Abstract Classes
The Root of All Classes: Object
Boxing and Unboxing Types
Nesting Classes
6.Operator Overloading
Using the operator Keyword Supporting Other .NET Languages Creating Useful Operators Logical Pairs The Equals Operator Conversion Operators
7.Structs
Defining Structs Creating Structs
8.Interfaces
Implementing an Interface Accessing Interface Methods Overriding Interface Implementations Explicit Interface Implementation
9. Arrays, Indexers, and Collections
Arrays
The foreach Statement
Indexers
Collection Interfaces
Array Lists
Queues
Stacks
Dictionaries
10. Strings and Regular Expressions
Strings
Regular Expressions
11. Handling Exceptions
Throwing and Catching Exceptions Exception Objects Custom Exceptions Rethrowing Exceptions
12.Delegates and Events
Delegates
Multicasting
Events
Retrieving Values from Multicast Delegates
Part II. Programming with C#
13.Building Windows Applications
Creating a Simple Windows Form Creating a Windows Forms Application XML Documentation Comments Deploying an Application
14. Accessing Data with ADO.N ET
Relational Databases and SQL The ADO.NET Object Model
Getting Started with ADO.NET Using OLE DB Managed Providers Working with Data-Bound Controls Changing Database Records ADO.NETandXML
75. Programming Web Forms and Web Services.
Understanding Web Forms
Creating a Web Form
Adding Controls
Data Binding
Responding to Postback Events
Web Services
SOAP, WSDL, and Discovery
Building a Web Service
Creating the Proxy
16. Putting It All Together
The Overall Design The Screen-Scraper Application Displaying the Output Creating the Web Services Client Searching By Category
Part III. The CLR and the .NET Framework
17. Assemblies and Versioning
PE Files
Metadata
Security Boundary
Versioning
Manifests
Multi-Module Assemblies
Private Assemblies
Shared Assemblies
18.Attributes and Reflection
Attributes Reflection Reflection Emit
19.Marshaling and Remoting
Application Domains
Context
Remoting
20.Threads and Synchronization
Threads
Synchronization
Race Conditions and Deadlocks
21.Streams
Files and Directories Reading and Writing Data Asynchronous I/O Network I/O Web Streams Serialization Isolated Storage
22.Programming .NET and COM
Importing ActiveX Controls Importing COM Components Exporting .NET Components P/Invoke Pointers
Appendix:C# Keywords
Index