Full Description
The programming language C# was built with the future of application development in mind. Pursuing that vision, C#'s designers succeeded in creating a safe, simple, component-based, high-performance language that works effectively with Microsoft's .NET Framework. Now the favored language among those programming for the Microsoft platform, C# continues to grow in popularity as more developers discover its strength and flexibility. And, from the start, C# developers have relied on Programming C# both as an introduction to the language and a means of further building their skills. The fourth edition of Programming C#--the top-selling C# book on the market--has been updated to the C# ISO standard as well as changes to Microsoft's implementation of the language. It also provides notes and warnings on C# 1.1 and C# 2.0.
Aimed at experienced programmers and web developers, Programming C#, 4th Edition doesn't waste too much time on the basics. Rather, it focuses on the features and programming patterns that are new to C# language. Some of these new features covered in-depth include:
Visual Studio 2005
Generics
Collection interfaces and iterators
Anonymous methods
New ADO.NET data controls
Fundamentals of Object Oriented Programming
Author Jesse Liberty, an acclaimed web programming expert and entrepreneur, teaches C# in a way that experienced programmers will appreciate by grounding its applications firmly in the context of Microsoft's .NET platform and the development of desktop and Internet applications.
Liberty also incorporates reader suggestions from previous editions to help create the most consumer-friendly guide possible.
Table of Contents
Preface
Part I. 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
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 Equality Operator
Conversion Operators
7. Structs
Defining Structs
Creating Structs
8. Interfaces
Defining and Implementing an Interface
Accessing Interface Methods
Overriding Interface Implementations
Explicit Interface Implementation
9. Arrays, Indexers, and Collections
Arrays
The foreach Statement
Indexers
Collection Interfaces
Constraints
List
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
Using Anonymous Methods
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
14. Accessing Data with ADO.NET
Relational Databases and SQL
The ADO.NET Object Model
Getting Started with ADO.NET
Using OLE DB Managed Providers
Working with Data-Bound Controls
15. Programming ASP.NET Applications and Web Services
Understanding Web Forms
Creating a Web Form
Adding Controls
Data Binding
Web Services
SOAP, WSDL, and Discovery
Building a Web Service
Creating the Proxy
16. Putting It All Together
The Overall Design
Creating the Web Services Client
Displaying the Output
Searching by Category
Part III. The CLR and the .NET Framework
17. Assemblies and Versioning
PE Files
Metadata
Security Boundary
Manifests
Multimodule Assemblies
Private Assemblies
Shared Assemblies
18. Attributes and Reflection
Attributes
Reflection
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