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#, 2nd 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.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#, 2nd 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 cynchronization, 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#, 2nd 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.
Synopsis
Concise but thorough, this second edition of
C# Essentials introduces the Microsoft C# programming language, including the Microsoft .NET Common Language Runtime (CLR) and .NET Framework Class Libraries (FCL) that support it. This books compact format and terse presentation of key concepts serve as a roadmap to the online documentation included with the Microsoft .NET Framework SDK; the many examples provide much-needed context. This new edition has been updated to cover the final release of the C# language. In addition to overviews of C#, the CLR, and the FCL, this new edition of
C# Essentials covers:
- Every C# language element and its syntax, in reference format, including new keywords
- The major C# datatypes, with code examples
- Common C# programming tasks
- Interoperation with legacy Win32 APIs and COM components, and the use of C/C++ style pointers within the managed context of the CLR
- Common development issues
C# Essentials is an easy way for experienced programmers to evaluate and get up to speed quickly on the language best suited to developing web applications and services on the new Microsoft .NET platform.
Synopsis
Concise but thorough, this second edition introduces the Microsoft C# programming language, including the Microsoft .NET Common Language Runtime (CLR) and .NET Framework Class Libraries (FCL) that support it. This book's compact format and terse presentation of key concepts serve as a roadmap to the online documentation included with the Microsoft .NET Framework SDK.
About the Author
Ben Albahari is a former Program Manager at Microsoft, where he worked on several projects, including the .NET Compact Framework and ADO.NET. He was the cofounder of Genamics, a provider of tools for C# and J++ programmers, as well as software for DNA and protein sequence analysis. He is a coauthor of C# Essentials, the first C# book from O'Reilly, and of previous editions of C# in a Nutshell. He is the founder of TakeOnIt, a website for comparing opinions of experts, leaders and organizations
Peter Drayton is an independent consultant, helping early-stage companies define and build systems that take advantage of technologies such as .NET, SOAP, XML, and COM+. Peter is also an instructor for DevelopMentor, where he teaches Essential C#.NET. Originally from Cape Town, South Africa, Peter now lives in the San Francisco Bay Area with his wife, Julie. He spends his spare time researching .NET and tinkering with a small flotilla of computers cluttering up their a partment. He can be reached at [email protected].
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++; 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 Events; Programming with C#; Chapter 13: Building Windows Applications; 13.1 Creating a Simple Windows Form; 13.2 Creating a Windows Form 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 Applicationswith Web Forms; 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 ASP.NET and C#; Chapter 16: Programming Web Services; 16.1 SOAP, WSDL, and Discovery; 16.2 Building a Web Service; 16.3 Creating the Proxy; 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 Intrinsic Attributes; 18.3 Custom Attributes; 18.4 Reflection; 18.5 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; Glossary; Colophon;