Synopses & Reviews
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 author has updated this latest edition to reflect the release of Visual Studio .NET 2003 and the .NET Framework 1.1. Also included is a new chapter demonstrating various Web forms and Web services applications, and enlarged and expanded his coverage of events and delegates.
About the Author
Jesse Liberty, Microsoft .NET MVP, is the best-selling author of O'Reilly Media's "Programming ASP.NET", "Programming C#", "Programming Visual Basic 2005" and over 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 .NET. Jesse is a frequent contributor to O'Reilly Network web sites as well as many industry publications and has spoken at numerous industry events. He is a former Distinguished Software Engineer at AT&T and Vice President for technology development at CitiBank.
Table of Contents
Preface; About This Book; How the Book Is Organized; Who This Book Is For; C# Versus Visual Basic .NET; C# Versus Java; C# Versus C and C++; Conventions Used in This Book; Support; We'd Like to Hear from You; Acknowledgments; The C# Language; Chapter 1: C# and the .NET Framework; 1.1 The .NET Platform; 1.2 The .NET Framework; 1.3 Compilation and the MSIL; 1.4 The C# Language; Chapter 2: Getting Started: "Hello World"; 2.1 Classes, Objects, and Types; 2.2 Developing "Hello World"; 2.3 Using the Visual Studio .NET Debugger; Chapter 3: C# Language Fundamentals; 3.1 Types; 3.2 Variables and Constants; 3.3 Expressions; 3.4 Whitespace; 3.5 Statements; 3.6 Operators; 3.7 Namespaces; 3.8 Preprocessor Directives; Chapter 4: Classes and Objects; 4.1 Defining Classes; 4.2 Creating Objects; 4.3 Using Static Members; 4.4 Destroying Objects; 4.5 Passing Parameters; 4.6 Overloading Methods and Constructors; 4.7 Encapsulating Data with Properties; 4.8 readonly Fields; Chapter 5: Inheritance and Polymorphism; 5.1 Specialization and Generalization; 5.2 Inheritance; 5.3 Polymorphism; 5.4 Abstract Classes; 5.5 The Root of All Classes: Object; 5.6 Boxing and Unboxing Types; 5.7 Nesting Classes; Chapter 6: Operator Overloading; 6.1 Using the operator Keyword; 6.2 Supporting Other .NET Languages; 6.3 Creating Useful Operators; 6.4 Logical Pairs; 6.5 The Equals Operator; 6.6 Conversion Operators; Chapter 7: Structs; 7.1 Defining Structs; 7.2 Creating Structs; Chapter 8: Interfaces; 8.1 Implementing an Interface; 8.2 Accessing Interface Methods; 8.3 Overriding Interface Implementations; 8.4 Explicit Interface Implementation; Chapter 9: Arrays, Indexers, and Collections; 9.1 Arrays; 9.2 The foreach Statement; 9.3 Indexers; 9.4 Collection Interfaces; 9.5 Array Lists; 9.6 Queues; 9.7 Stacks; 9.8 Dictionaries; Chapter 10: Strings and Regular Expressions; 10.1 Strings; 10.2 Regular Expressions; Chapter 11: Handling Exceptions; 11.1 Throwing and Catching Exceptions; 11.2 Exception Objects; 11.3 Custom Exceptions; 11.4 Rethrowing Exceptions; Chapter 12: Delegates and Events; 12.1 Delegates; 12.2 Multicasting; 12.3 Events; 12.4 Retrieving Values from Multicast Delegates; Programming with C#; Chapter 13: Building Windows Applications; 13.1 Creating a Simple Windows Form; 13.2 Creating a Windows Forms Application; 13.3 XML Documentation Comments; 13.4 Deploying an Application; Chapter 14: Accessing Data with ADO.NET; 14.1 Relational Databases and SQL; 14.2 The ADO.NET Object Model; 14.3 Getting Started with ADO.NET; 14.4 Using OLE DB Managed Providers; 14.5 Working with Data-Bound Controls; 14.6 Changing Database Records; 14.7 ADO.NET and XML; Chapter 15: Programming Web Forms and Web Services; 15.1 Understanding Web Forms; 15.2 Creating a Web Form; 15.3 Adding Controls; 15.4 Data Binding; 15.5 Responding to Postback Events; 15.6 Web Services; 15.7 SOAP, WSDL, and Discovery; 15.8 Building a Web Service; 15.9 Creating the Proxy; Chapter 16: Putting It All Together; 16.1 The Overall Design; 16.2 The Screen-Scraper Application; 16.3 Displaying the Output; 16.4 Creating the Web Services Client; 16.5 Searching By Category; The CLR and the .NET Framework; Chapter 17: Assemblies and Versioning; 17.1 PE Files; 17.2 Metadata; 17.3 Security Boundary; 17.4 Versioning; 17.5 Manifests; 17.6 Multi-Module Assemblies; 17.7 Private Assemblies; 17.8 Shared Assemblies; Chapter 18: Attributes and Reflection; 18.1 Attributes; 18.2 Reflection; 18.3 Reflection Emit; Chapter 19: Marshaling and Remoting; 19.1 Application Domains; 19.2 Context; 19.3 Remoting; Chapter 20: Threads and Synchronization; 20.1 Threads; 20.2 Synchronization; 20.3 Race Conditions and Deadlocks; Chapter 21: Streams; 21.1 Files and Directories; 21.2 Reading and Writing Data; 21.3 Asynchronous I/O; 21.4 Network I/O; 21.5 Web Streams; 21.6 Serialization; 21.7 Isolated Storage; Chapter 22: Programming .NET and COM; 22.1 Importing ActiveX Controls; 22.2 Importing COM Components; 22.3 Exporting .NET Components; 22.4 P/Invoke; 22.5 Pointers; C# Keywords; Colophon;