| |
| |
Introduction | |
| |
| |
| |
C# Basics | |
| |
| |
| |
The C# Environment | |
| |
| |
The Common Language Infrastructure (CLI) | |
| |
| |
Standardization | |
| |
| |
The .NET Architecture | |
| |
| |
Where C# Fits In | |
| |
| |
Summary | |
| |
| |
| |
Getting Started with C# | |
| |
| |
Writing a Simple C# Program | |
| |
| |
Comments | |
| |
| |
Identifiers and Keywords | |
| |
| |
Style | |
| |
| |
Preparing a Program To Run | |
| |
| |
Basic C# Types | |
| |
| |
Definite Assignment | |
| |
| |
Basic Conversions | |
| |
| |
Arrays | |
| |
| |
Interacting with Programs | |
| |
| |
Summary | |
| |
| |
| |
Writing C# Expressions | |
| |
| |
Unary Operators | |
| |
| |
Binary Operators | |
| |
| |
The Ternary Operator | |
| |
| |
Other Operators | |
| |
| |
Enumeration Expressions | |
| |
| |
Array Expressions | |
| |
| |
Statements | |
| |
| |
Blocks | |
| |
| |
Labels | |
| |
| |
Declarations | |
| |
| |
Operator Precedence and Associativity | |
| |
| |
Summary | |
| |
| |
| |
Using Statements and Loops to Control Program Flow | |
| |
| |
if Statements | |
| |
| |
switch Statements | |
| |
| |
C# Loops | |
| |
| |
goto Statements | |
| |
| |
break Statements | |
| |
| |
continue Statements | |
| |
| |
return Statements | |
| |
| |
Summary | |
| |
| |
| |
Debugging and Pre-Processing | |
| |
| |
Pre-Processing Directives | |
| |
| |
Debugging C# Programs | |
| |
| |
Summary | |
| |
| |
| |
Object and Component Programming with C# | |
| |
| |
| |
Object and Component Concepts | |
| |
| |
What Is an Object? | |
| |
| |
Object Classification | |
| |
| |
Object Hierarchies | |
| |
| |
Abstraction | |
| |
| |
Objects within Objects | |
| |
| |
Objects with Different Behaviors | |
| |
| |
Component Interfaces | |
| |
| |
Component Properties | |
| |
| |
Component Events | |
| |
| |
Summary | |
| |
| |
| |
Working with Classes | |
| |
| |
Class Members | |
| |
| |
Instance and Static Members | |
| |
| |
Use of Accessibility Modifiers | |
| |
| |
Fields | |
| |
| |
Constructors | |
| |
| |
Destructors | |
| |
| |
Methods | |
| |
| |
Properties | |
| |
| |
Indexers | |
| |
| |
Full XML Comments | |
| |
| |
Summary | |
| |
| |
| |
Designing Object-Oriented Programs | |
| |
| |
Inheritance | |
| |
| |
Encapsulating Object Internals | |
| |
| |
Polymorphism | |
| |
| |
Summary | |
| |
| |
| |
Overloading Class Members and Operators | |
| |
| |
Overloading Methods | |
| |
| |
Overloading Indexers | |
| |
| |
Overloading Operators | |
| |
| |
Resolving Overloaded Members | |
| |
| |
Summary | |
| |
| |
| |
Handling Exceptions and Errors | |
| |
| |
try/catch Blocks | |
| |
| |
finally Blocks | |
| |
| |
Predefined Exception Classes | |
| |
| |
Handling Exceptions | |
| |
| |
Designing Your Own Exceptions | |
| |
| |
checked and unchecked Statements | |
| |
| |
Summary | |
| |
| |
| |
Delegates and Events | |
| |
| |
Delegates | |
| |
| |
Events | |
| |
| |
Summary | |
| |
| |
| |
Organizing Code with Namespaces | |
| |
| |
Why Namespaces? | |
| |
| |
Namespace Directives | |
| |
| |
Creating Namespaces | |
| |
| |
Namespace Members | |
| |
| |
Scope and Visibility | |
| |
| |
Summary | |
| |
| |
| |
Creating structs | |
| |
| |
Identifying the class/struct Relationship | |
| |
| |
Type System Unification | |
| |
| |
Designing a New Value Type | |
| |
| |
Summary | |
| |
| |
| |
Implementing Interfaces | |
| |
| |
Abstract Class Versus Interface | |
| |
| |
Interface Members | |
| |
| |
Implicit Implementation | |
| |
| |
Explicit Implementation | |
| |
| |
Mapping | |
| |
| |
Inheritance | |
| |
| |
Summary | |
| |
| |
| |
Performing Conversions | |
| |
| |
Implicit Versus Explicit Conversions | |
| |
| |
Value Type Conversions | |
| |
| |
Reference Type Conversions | |
| |
| |
Summary | |
| |
| |
| |
Using Class Libraries with C# | |
| |
| |
| |
Presenting Graphical User Interfaces | |
| |
| |
Windows | |
| |
| |
Controls | |
| |
| |
N-Tier Architecture | |
| |
| |
Menus | |
| |
| |
Summary | |
| |
| |
| |
File I/O and Serialization | |
| |
| |
Files and Directories | |
| |
| |
Streams | |
| |
| |
Serialization | |
| |
| |
Summary | |
| |
| |
| |
XML | |
| |
| |
Writing | |
| |
| |
Reading | |
| |
| |
Summary | |
| |
| |
| |
Database Programming with ADO.NET | |
| |
| |
Making Connections | |
| |
| |
Viewing Data | |
| |
| |
Manipulating Data | |
| |
| |
Calling Stored Procedures | |
| |
| |
Retrieving DataSets | |
| |
| |
Summary | |
| |
| |
| |
Writing Web Applications with ASP.NET | |
| |
| |
A Simple Web Page | |
| |
| |
Controls | |
| |
| |
Making a Web Form | |
| |
| |
Code-Behind Web Pages | |
| |
| |
Summary | |
| |
| |
| |
Remoting | |
| |
| |
Basic Remoting | |
| |
| |
Proxys | |
| |
| |
Channels | |
| |
| |
Lifetime Management | |
| |
| |
Summary | |
| |
| |
| |
Web Services | |
| |
| |
Web Service Basics | |
| |
| |
Using Web Services | |
| |
| |
Summary | |
| |
| |
| |
Extreme C# | |
| |
| |
| |
Multi-Threading | |
| |
| |
Creating New Threads | |
| |
| |
Synchronization | |
| |
| |
Summary | |
| |
| |
| |
Browsing the Network Libraries | |
| |
| |
Implementing Sockets | |
| |
| |
Working with HTTP | |
| |
| |
Summary | |
| |
| |
| |
String Manipulation | |
| |
| |
The String Class | |
| |
| |
The StringBuilder Class | |
| |
| |
String Formatting | |
| |
| |
Regular Expressions | |
| |
| |
Summary | |
| |
| |
| |
C# Collections | |
| |
| |
Pre-Existing Collections | |
| |
| |
Collection Interfaces | |
| |
| |
Creating a Collection | |
| |
| |
Summary | |
| |
| |
| |
Attributes | |
| |
| |
Using Attributes | |
| |
| |
Using Attribute Parameters | |
| |
| |
Using Attribute Targets | |
| |
| |
Creating Your Own Attributes | |
| |
| |
Getting Attributes from a Class | |
| |
| |
Summary | |
| |
| |
| |
Reflection | |
| |
| |
Discovering Program Information | |
| |
| |
Dynamically Activating Code | |
| |
| |
Reflection.Emit | |
| |
| |
Summary | |
| |
| |
| |
Localization and Resources | |
| |
| |
Resource Files | |
| |
| |
Multiple Locales | |
| |
| |
Summary | |
| |
| |
| |
Unsafe Code and PInvoke | |
| |
| |
Unsafe Code | |
| |
| |
Platform Invoke | |
| |
| |
Summary | |
| |
| |
| |
Runtime Debugging | |
| |
| |
Simple Debugging | |
| |
| |
Conditional Debugging | |
| |
| |
Runtime Tracing | |
| |
| |
Making Assertions | |
| |
| |
Summary | |
| |
| |
| |
Performance Monitoring | |
| |
| |
Accessing Built-in Performance Counters | |
| |
| |
Implementing Timers | |
| |
| |
Building a Customized Performance Counter | |
| |
| |
Analyzing Performance with Sampling | |
| |
| |
Summary | |
| |
| |
| |
Integrating C# with COM | |
| |
| |
Communicating with COM from .NET | |
| |
| |
Exposing a .NET Component as a COM Component | |
| |
| |
Introduction to .NET Support for COM+ Services | |
| |
| |
Summary | |
| |
| |
| |
The C# Environment | |
| |
| |
| |
Garbage Collection | |
| |
| |
Automatic Memory Management | |
| |
| |
Finalizing Your Code Properly | |
| |
| |
Controlling Garbage Collection | |
| |
| |
Summary | |
| |
| |
| |
Cross-Language Programming with C# | |
| |
| |
The Common Type System (CTS) | |
| |
| |
The Common Language Specification (CLS) | |
| |
| |
Tips for Making Your Code CLS-Compatible | |
| |
| |
Writing a Cross-Language Program | |
| |
| |
Summary | |
| |
| |
| |
The Common Language Runtime | |
| |
| |
Managed Execution | |
| |
| |
Metadata | |
| |
| |
Managed Services | |
| |
| |
Summary | |
| |
| |
| |
Versioning and Assemblies | |
| |
| |
Inside Assemblies | |
| |
| |
Assembly Features | |
| |
| |
Configuration | |
| |
| |
Deployment | |
| |
| |
Summary | |
| |
| |
| |
Securing Code | |
| |
| |
Code-Based Security | |
| |
| |
Role-Based Security | |
| |
| |
Security Utilities | |
| |
| |
Summary | |
| |
| |
| |
Appendixes | |
| |
| |
| |
Compiling Programs | |
| |
| |
Assemblies | |
| |
| |
Debug | |
| |
| |
Miscellaneous | |
| |
| |
Optimization | |
| |
| |
Output | |
| |
| |
Preprocessing | |
| |
| |
Resources | |
| |
| |
| |
The .NET Frameworks Class Libraries | |
| |
| |
| |
Online Resources | |
| |
| |
C# Sites | |
| |
| |
.NET Sites | |
| |
| |
Index | |