|
|
|
Copyright
|
|
|
|
About the Authors
|
|
|
|
We Want to Hear from You!
|
|
|
|
INTRODUCTION
|
|
|
|
|
Welcome to Visual C# .NET 2003
|
|
|
|
|
Along Came .NET
|
|
|
|
|
What's New in Visual Studio .NET
|
|
|
|
Part I. Introduction to the Visual Studio .NET IDE
|
|
|
|
|
Chapter 1. The Visual Studio .NET IDE
|
|
|
|
|
Window Management and Customization
|
|
|
|
|
Understanding Visual Studio .NET 2003's Tool Windows
|
|
|
|
|
Working with Documents
|
|
|
|
|
Using External Tools
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part II. Language Fundamentals
|
|
|
|
|
Chapter 2. Introduction to C#
|
|
|
|
|
Why Learn Yet Another Language?
|
|
|
|
|
Learning Common Types
|
|
|
|
|
What Is the Common Language Runtime?
|
|
|
|
|
Take Out the Trash: Theory of Garbage Collection
|
|
|
|
|
Introduction to the Base Class Library
|
|
|
|
|
The Canonical "Hello World" Example
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 3. Expressions and Control Structures
|
|
|
|
|
Expressions and Control Structures
|
|
|
|
|
Basic Expressions
|
|
|
|
|
Legal Variable Names
|
|
|
|
|
Using C# Operators
|
|
|
|
|
Pre/Post Operators
|
|
|
|
|
Program Flow Control: Control Structures
|
|
|
|
|
Looping
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 4. Strings and Regular Expressions
|
|
|
|
|
String Basics
|
|
|
|
|
Using Regular Expressions
|
|
|
|
|
How to Use Matching
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 5. ARRAYS AND COLLECTIONS
|
|
|
|
|
Using Arrays
|
|
|
|
|
Collection Basics
|
|
|
|
|
Collections Provided by the Base Class Libraries
|
|
|
|
|
Creating Custom Collections
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 6. Objects and Classes
|
|
|
|
|
Objects and Classes
|
|
|
|
|
Advanced Topics in Classes and Objects
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 7. FILE AND STREAM I/O AND OBJECT PERSISTENCE
|
|
|
|
|
File and Stream I/O
|
|
|
|
|
Object Persistence
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 8. XML Fundamentals
|
|
|
|
|
Working with the DOM
|
|
|
|
|
Using the XmlReader Classes
|
|
|
|
|
Exploring XPath
|
|
|
|
|
Introduction to the XPathDocument
|
|
|
|
|
Serialization XML Style
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 9. Multithreaded Programming
|
|
|
|
|
Thread Basics
|
|
|
|
|
Synchronization
|
|
|
|
|
Applying the lock Keyword
|
|
|
|
|
Using the Thread Pool for Asynchronous Programming
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 10. Events and Delegates
|
|
|
|
|
What Is a Delegate?
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 11. Reflection and Code Attributes
|
|
|
|
|
Working with Reflection
|
|
|
|
|
Using Code Attributes
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 12. Assemblies and AppDomains
|
|
|
|
|
Assemblies
|
|
|
|
|
Introduction to Assemblies
|
|
|
|
|
Assembly Building Blocks
|
|
|
|
|
Creating Assemblies
|
|
|
|
|
Embedding Content and Resources in Assemblies
|
|
|
|
|
Localization and Satellite Assemblies
|
|
|
|
|
AppDomains
|
|
|
|
|
Putting It TogetherA Real-World Example
|
|
|
|
|
Summary
|
|
|
|
|
Chapter 13. COM and Windows Interoperability
|
|
|
|
|
Using .NET Code to Interact with COM
|
|
|
|
|
COM to .NET
|
|
|
|
|
Primary Interop Assemblies
|
|
|
|
|
Platform Invoke (P/Invoke)
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 14. High-Performance Programming
|
|
|
|
|
Introduction to Garbage Collection
|
|
|
|
|
Memory and Class Management in the Common Language Runtime
|
|
|
|
|
High-Performance Code: Best Practices
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part III. Windows Applications
|
|
|
|
|
Chapter 15. Introduction to Windows Forms
|
|
|
|
|
Windows Forms Basics
|
|
|
|
|
Hello World
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 16. Windows Forms User Interface Controls
|
|
|
|
|
Standard Windows Forms User Interface Controls
|
|
|
|
|
User Controls
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 17. Creating Visually Compelling Windows Forms Applications
|
|
|
|
|
Visual Inheritance
|
|
|
|
|
Creating and Using Dynamic Context Menus
|
|
|
|
|
Drawing Custom List Elements
|
|
|
|
|
Using the DrawMode Property
|
|
|
|
|
Shaped Forms
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 18. Consuming Web Services
|
|
|
|
|
Adding Web References
|
|
|
|
|
Supporting Dynamic URLs
|
|
|
|
|
Consuming Web Services Asynchronously
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 19. Smart Clients
|
|
|
|
|
Smart Clients
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 20. Deploying Windows Applications
|
|
|
|
|
Installing .NET Applications
|
|
|
|
|
Web Installations
|
|
|
|
|
MSI/Project Installations
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part IV. Web Applications
|
|
|
|
|
Chapter 21. Introduction to Web Forms and ASP.NET
|
|
|
|
|
Understanding the Web Forms Designer
|
|
|
|
|
Creating an ASP.NET "Hello World" Application
|
|
|
|
|
Basic Event Handling
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 22. Web UI Controls
|
|
|
|
|
Server Controls
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 23. State Management in ASP.NET
|
|
|
|
|
Client-Side State Management
|
|
|
|
|
Server-Side State Management
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 24. Caching
|
|
|
|
|
Caching
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 25. ADVANCED ASP.NET
|
|
|
|
|
Creating ASP.NET Applications in a Web Farm
|
|
|
|
|
Localization and Globalization in ASP.NET
|
|
|
|
|
Creating Custom HttpModules
|
|
|
|
|
Creating Custom HttpHandlers
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 26. Deploying ASP.NET Applications
|
|
|
|
|
Manually Deploying an ASP.NET Application
|
|
|
|
|
Automated Deployment
|
|
|
|
|
Advanced ASP.NET Deployment
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part V. Data Access
|
|
|
|
|
Chapter 27. Using .NET Data Providers
|
|
|
|
|
SQL Server Data Provider
|
|
|
|
|
Working with the OLEDB Data Provider
|
|
|
|
|
Additional Data Providers
|
|
|
|
|
DataSet and DataAdapter Binding
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 28. Creating a Custom ADO.NET Data Provider
|
|
|
|
|
Custom Data Providers
|
|
|
|
|
Implementing IDataParameter and IDataParameterCollection
|
|
|
|
|
Implementing a Custom Connection
|
|
|
|
|
Implementing a Custom Command
|
|
|
|
|
Implementing a Custom DataReader
|
|
|
|
|
Implementing a Custom DataAdapter
|
|
|
|
|
Summary
|
|
|
|
|
Chapter 29. Typed DataSets and XSD
|
|
|
|
|
XML Schema Definition
|
|
|
|
|
Structuring DataSets with Schema
|
|
|
|
|
Typed DataSets
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 30. Windows Forms Data Binding
|
|
|
|
|
Data Binding Overview
|
|
|
|
|
Data Binding Mechanics
|
|
|
|
|
Data Binding Samples
|
|
|
|
|
Advanced Binding Samples
|
|
|
|
|
Summary
|
|
|
|
|
Chapter 31. Web Forms Data Binding
|
|
|
|
|
Data Binding Overview
|
|
|
|
|
Data Binding Mechanics
|
|
|
|
|
Data Binding Samples
|
|
|
|
|
Advanced Binding Samples
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part VI. Web Services
|
|
|
|
|
Chapter 32. Introduction to Web Services
|
|
|
|
|
Introduction to Web Services
|
|
|
|
|
Building Web Services
|
|
|
|
|
Review of Web Service Consumption
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 33. Introduction to WSE 2.0
|
|
|
|
|
Introduction to WSE 2.0
|
|
|
|
|
TCP Messaging
|
|
|
|
|
Security
|
|
|
|
|
Messaging with Attachments Using WSE 2.0
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part VII. Secure Applications
|
|
|
|
|
Chapter 34. Code Access Security
|
|
|
|
|
Introduction to CAS
|
|
|
|
|
CAS Administration
|
|
|
|
|
Writing CAS-Aware Code
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 35. Securing Sensitive Data
|
|
|
|
|
Secret Key (Symmetric) Encryption
|
|
|
|
|
Using Hashes to Protect Data
|
|
|
|
|
Public Key Encryption and Signatures
|
|
|
|
|
Windows Data Protection API
|
|
|
|
|
Summary
|
|
|
|
|
Chapter 36. Securing ASP.NET Web Applications
|
|
|
|
|
User Security
|
|
|
|
|
Data Security in ASP.NET Applications
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 37. Licensing and Intellectual Property
|
|
|
|
|
Licensing Overview
|
|
|
|
|
Implementing Custom Licensing
|
|
|
|
|
Licensing Implementation Strategies
|
|
|
|
|
Protecting Your Intellectual Property
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part VIII. Enterprise and Connected Applications
|
|
|
|
|
Chapter 38. Interface Programming
|
|
|
|
|
Interface Programming
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 39. Remoting
|
|
|
|
|
Remoting Architecture
|
|
|
|
|
IIS and Remoting
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 40. COM+ Enterprise Services
|
|
|
|
|
Overview of COM+
|
|
|
|
|
Building COM+ Components
|
|
|
|
|
Security in COM+
|
|
|
|
|
Advanced COM+
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 41. Enterprise Templates
|
|
|
|
|
Enterprise Templates
|
|
|
|
|
Policy Files
|
|
|
|
|
Teaching by Example
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Part IX. Debugging and Testing
|
|
|
|
|
Chapter 42. Debugging Your Applications
|
|
|
|
|
The Visual Studio .NET Debugging Environment
|
|
|
|
|
Debugging with Visual Studio .NET
|
|
|
|
|
Chapter 43. Monitoring Your Applications
|
|
|
|
|
Debugging and Tracing Statements
|
|
|
|
|
Summary
|
|
|
|
|
Chapter 44. Instrumenting Your Application
|
|
|
|
|
Instrumenting Applications
|
|
|
|
|
Enterprise Instrumentation Framework
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
|
Chapter 45. The Future of C#
|
|
|
|
|
The Future of C#
|
|
|
|
|
Summary
|
|
|
|
|
Further Reading
|
|
|
|
Index
|