C# was designed from the ground up for development on Microsoft's .NET framework. As such, it's a high-performance language that's simple, safe, object-oriented, and Internet-centric. Programming C#, 3rd Edition teaches this new language 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.Bestselling author Jesse Liberty has updated this latest edition to reflect the release of Visual Studio .NET 2003 and the .NET Framework 1.1. He's also added an entirely new chapter demonstrating various web forms and web services applications, and enlarged and expanded his coverage of events and delegates in response to numerous reader requests. He's even added tips for programmers coming from VB and C++ backgrounds.The first part of this book introduces C# fundamentals, then goes on to explain:

Classes and objects

Inheritance and polymorphism

Operator overloading

Structs and interfaces

Arrays, indexers, and collections

String objects and regular expressions

Exceptions and bug handling

Delegates and events

Part two of Programming C#, 3rd Edition focuses on development of desktop and Internet applications, including Windows Forms, ADO.NET and ASP.NET. ASP.NET includes Web Forms, for rapid development of web applications, and Web Services for creating objects without user interfaces, to provide services over the Internet.Part three gets to the heart of the .NET Framework, focusing on attributes and reflection, remoting, threads and synchronization, and streams. Part three also illustrates how to interoperate with COM objects.In much the way that you can see the features and personality of the parents and grandparents in young children, you can easily see the influence of Java, C++, Visual Basic, and other languages in C#. The level of information in Programming C#, 3rd Edition allows you to become productive quickly with C# and to rely on it as a powerful addition to your family of mastered programming languages.

The C# Language

Chapter 1 C# and the .NET Framework

The .NET Platform

The .NET Framework

Compilation and the MSIL

The C# Language

Chapter 2 Getting Started: “Hello World”

Classes, Objects, and Types

Developing “Hello World”

Using the Visual Studio .NET Debugger

Chapter 3 C# Language Fundamentals

Types

Variables and Constants

Expressions

Whitespace

Statements

Operators

Namespaces

Preprocessor Directives

Chapter 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

Chapter 5 Inheritance and Polymorphism

Specialization and Generalization

Inheritance

Polymorphism

Abstract Classes

The Root of All Classes: Object

Boxing and Unboxing Types

Nesting Classes

Chapter 6 Operator Overloading

Using the operator Keyword

Supporting Other .NET Languages

Creating Useful Operators

Logical Pairs

The Equals Operator

Conversion Operators

Chapter 7 Structs

Defining Structs

Creating Structs

Chapter 8 Interfaces

Implementing an Interface

Accessing Interface Methods

Overriding Interface Implementations

Explicit Interface Implementation

Chapter 9 Arrays, Indexers, and Collections

Arrays

The foreach Statement

Indexers

Collection Interfaces

Array Lists

Queues

Stacks

Dictionaries

Chapter 10 Strings and Regular Expressions

Strings

Regular Expressions

Chapter 11 Handling Exceptions

Throwing and Catching Exceptions

Exception Objects

Custom Exceptions

Rethrowing Exceptions

Chapter 12 Delegates and Events

Delegates

Multicasting

Events

Retrieving Values from Multicast Delegates

Programming with C#

Chapter 13 Building Windows Applications

Creating a Simple Windows Form

Creating a Windows Forms Application

XML Documentation Comments

Deploying an Application

Chapter 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

Changing Database Records

ADO.NET and XML

Chapter 15 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

Chapter 16 Putting It All Together

The Overall Design

The Screen-Scraper Application

Displaying the Output

Creating the Web Services Client

Searching By Category

The CLR and the .NET Framework

Chapter 17 Assemblies and Versioning

PE Files

Metadata

Security Boundary

Versioning

Manifests

Multi-Module Assemblies

Private Assemblies

Shared Assemblies

Chapter 18 Attributes and Reflection

Attributes

Reflection

Reflection Emit

Chapter 19 Marshaling and Remoting

Application Domains

Context

Remoting

Chapter 20 Threads and Synchronization

Threads

Synchronization

Race Conditions and Deadlocks

Chapter 21 Streams

Files and Directories

Reading and Writing Data

Asynchronous I/O

Network I/O

Web Streams

Serialization

Isolated Storage

Chapter 22 Programming .NET and COM

Importing ActiveX Controls

Importing COM Components

Exporting .NET Components

P/Invoke

Pointers

Appendix C# Keywords

Colophon

Jesse Liberty

Jesse Liberty is the best selling author of Programming ASP.NET, Programming C#, and a dozen other books on web and object oriented programming. He is president of Liberty Associates, Inc., where he provides contract programming, consulting and on-site training in ASP.NET, C#, C++ and related topics. Jesse has been a Distinguished Software Engineer at AT&T and Vice President for technology development at CitiBank.

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Programming C#, Third Edition, is an African crowned crane. This tall, skinny bird wanders the marshes and grasslands of west and east Africa (the Western and Eastern African crowned cranes, Balearica pavonia pavonia and Balearica regulorum gibbericeps, respectively).Adult birds stand about three feet tall and weigh six to nine pounds. Inside their long necks is a five-foot long windpipe--part of which is coiled inside their breastbone--giving voice to loud calls that can carry for miles. They live for about 22 years, spending most of their waking hours looking for the various plants, small animals, and insects they like to eat. (One crowned crane food-finding technique, perfected during the 38 to 54 million years these birds have existed, is to stamp their feet as they walk, flushing out tasty bugs.) They are the only type of crane to perch in trees, which they do at night when sleeping.Social and talkative, African crowned cranes group together in pairs or families, and the smaller groups band together in flocks of more than 100 birds. Their elaborate mating dance has served as a model for some of the dances of local people. Linley Dolby was the production editor, and Sada Preisch was the proofreader for Programming C#, Third Edition. Linley Dolby and Claire Cloutier provided quality control. Julie Hawks wrote the index. Jamie Peppard provided production assistance.Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is an original engraving from the 19th century. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font.Bret Kerr designed the interior layout, based on a series design by David Futato. This book was converted by Andrew Savikas to FrameMaker 5.5.6 with a format conversion tool created by Erik Ray, Jason McIntosh, Neil Walls, and Mike Sierra that uses Perl and XML technologies. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Leanne Soylemez.

Good, I am very I suspect in speaking on books of Jesse Liberty, therefore in its book Learning C#, I improved many of the knowledge with the C#.

Today when reading this book, I have each time more the impression of that the author seems to be to my side teaching everything.

My vision, was perfected and continues expanding the measure that I make the revisions of this book. For that it has little notion on C#, I advise to read the Learning C# first, and later gradual going reading this book.

Ah, before I forget, if you he is of whom likes to read some books of C#, then I do not forget to have it in its table, bed, or place of bigger access.

It's always been good to see a vry good book in my library and for that I appreciate your efforts in writing such a wonderful book. It has covered almost all the aspects from CLR to Windows to Web programming. This book is really helpful for me in understanding the concepts.

Jesse Liberty's excellent book deserves the ultimate praise for an instructional text: it tells you the truth.

So much writing about .NET provides only over-simplistic code or obscure gimmicks, but nothing about its "heart" - enormously frustrating for someone trying to understand how this technology thinks as well as how it behaves.

The third edition of Programming C#, on the other hand, is a book one can count on for accessible explanations of concepts, from the eminently sensible description of what .NET is on page 1 to the advanced topics at the end.

There are also plenty of code samples, helpful definitions and a detailed Index for the practical-minded.

All in all, a terrific resource for the beginning/intermediate .NET developer.

I'm sorry you were frustrated by one of the examples not working for you. I wonder if you would mind downloading the code from my web site (http://www.LibertyAssociates.com) and see if that works for you.

While you're on my site you'll also find a complete errata, be sure to check that for last-minute changes. If you still have a problem after running the posted source code, you'll find a link to my private support discussion group, where you can post your question and have it answered, either by me or by other readers.

O'Reilly is the undisputed champion of technical books and Programming C# is another example of why. This is the third edition of what has been a great book. The new content in this book covers the new .NET 1.1 framework and the new Visual Studio .NET 2003.

Programming C# is both approachable for newcomers to the C# or programming world and detailed enough for experienced developers learning or using C#. It is broken into three distinct parts:

1. the C# language;

2. programming in C#; and

3. the Common Language Runtime (CLR) and the .NET framework.

Each of these sections could be (and most are) a book in their own right and Jesse Liberty does a good job addressing each one.

In Part 1, the C# language, the author takes the reader through the typical ?hello world? application to intricacies of exception handling and delegates (which I love by the way). Liberty touches on everything from traditional object oriented design (classes, inheritance, etc.) to operator overloading and support for other .NET languages. An extremely important point made (albeit in a very short section) in the operator overloading chapter is operator pairs. I don?t know how many times I have seen Java and Smalltalk developers overload the equals method without overloading the corresponding hashCode method. The point here is that with operator overloading, corresponding operators must be overloaded as well. Overall, this chapter is most useful for people new to C# or new to programming. Experienced OO developers will not find anything new in the objects and classes chapter, but that is not the reason for this book anyway.

In Part 2, the author takes us into the world of building a ?real? C# application. I say ?real? because no example is a book will ever cover all the gotchas and problems professional programmers see on a daily basis. Liberty touches on building Win32 applications (a bit light on this for my tastes), how to access databases using ADO.NET, building web apps and building web services. The web apps and web services chapter is the most interesting and informative of this part of the book. The author does a great job of explaining how web services work in C# and .NET. Liberty introduces an HTML screen scraping application and transforms it into a webservice consuming application, while explaining the ?evils? of screen scraping. As a veteran of 3270 (mainframe) and 5250 (AS/400) screen scraping, I can definitely agree with the author?.

In Part 3, Liberty goes into the internals of the .NET framework. Here the author delves into assemblies (for Java developers think jars), versioning assemblies (and why that is important ? think dll hell), attributes (an interesting meta data add on to the language) and reflection, and other advanced features like remoting, streams, threads, and COM. This is probably the part of the book that the experienced C# programmer will find the most interesting. Liberty goes into a good amount of detail on each of these topics.

Overall, Programming C# is a well written informative book. The book is sprinkled liberally with code examples. I found the tips and traps a great feature that readily pointed out important topics when I was just skimming over a chapter. The only things I really didn?t like was Part 1 (as I have been doing C# for about a year and OO design and programming for over 10) and the surface treatment of Win32 programming. The internals of the CLR and .NET was very interesting. I would definitely recommend this book to brand new and intermediate level C# developers. More experienced programmers may not find all they are looking for here.