COVID-19 Response at

Read what we're doing...

Essential C# 4.0


Product Description
Product Details

Table of Contents

Contents of C# 4.0 Topics xxvFigures xxviiTables xxixForeword xxxiPreface xxxvAcknowledgments xlviiAbout the Author li Chapter 1: Introducing C# 1Hello, World 2C# Syntax Fundamentals 4Working with Variables 12Console Input and Output 16Comments 20Managed Execution and the Common Language Infrastructure 23C# and .NET Versioning 26Common Intermediate Language and ILDASM 27Summary 30 Chapter 2: Data Types 31Fundamental Numeric Types 32More Fundamental Types 40null and void 51Categories of Types 55Nullable Modifier 57Conversions between Data Types 58Arrays 64Summary 81 Chapter 3: Operators and Control Flow 83Operators 84Introducing Flow Control 98Code Blocks ({}) 105Scope and Declaration Space 107Boolean Expressions 109Bitwise Operators (<<, >>, |, &, ^, ~) 115Control Flow Statements, Continued 121Jump Statements 132C# Preprocessor Directives 138Summary 145 Chapter 4: Methods and Parameters 149Calling a Method 150Declaring a Method 157The using Directive 161Returns and Parameters on Main() 165Parameters 168Recursion 176Method Overloading 179Optional Parameters 182Basic Error Handling with Exceptions 186Summary 199 Chapter 5: Classes 201Declaring and Instantiating a Class 205Instance Fields 209Instance Methods 211Using the this Keyword 213Access Modifiers 220Properties 222Constructors 236Static Members 247Extension Methods 256Encapsulating the Data 258Nested Classes 260Partial Classes 262Summary 267 Chapter 6: Inheritance 269Derivation 270Overriding the Base Class 281Abstract Classes 293All Classes Derive from System.Object 299Verifying the Underlying Type with the is Operator 301Conversion Using the as Operator 302Summary 303 Chapter 7: Interfaces 305Introducing Interfaces 306Polymorphism through Interfaces 307Interface Implementation 312Converting between the Implementing Class and ItsInterfaces 318Interface Inheritance 318Multiple Interface Inheritance 321Extension Methods on Interfaces 322Implementing Multiple Inheritance via Interfaces 323Versioning 326Interfaces Compared with Classes 328Summary 329 Chapter 8: Value Types 331Structs 332Boxing 339Enums 346Summary 356 Chapter 9: Well-Formed Types 357Overriding object Members 357Operator Overloading 369Referencing Other Assemblies 377Defining Namespaces 382XML Comments 385Garbage Collection 390Resource Cleanup 393Lazy Initialization 400Summary 403 Chapter 10: Exception Handling 405Multiple Exception Types 405Catching Exceptions 407General Catch Block 409Guidelines for Exception Handling 411Defining Custom Exceptions 414Summary 419 Chapter 11: Generics 421C# without Generics 422Introducing Generic Types 427Constraints 439Generic Methods 453Covariance and Contravariance 457Generic Internals 463Summary 467 Chapter 12: Delegates and Lambda Expressions 469Introducing Delegates 470Anonymous Methods 480System-Defined Delegates: Func<> 483Lambda Expressions 486Summary 506 Chapter 13: Events 507Coding the Observer Pattern with Multicast Delegates 508Events 523Summary 533 Chapter 14: Collection Interfaces with Standard Query Operators 535Anonymous Types and Implicitly Typed Local Variables 536Collection Initializers 543What Makes a Class a Collection: IEnumerable 546Standard Query Operators 552Summary 586 Chapter 15: LINQ with Query Expressions 589Introducing Query Expressions 590Query Expressions as Method Invocations 608Summary 609 Chapter 16: Building Custom Collections 611More Collection Interfaces 612Primary Collection Classes 617Providing an Index Operator 630Returning Null or an Empty Collection 634Iterators 634Summary 650 Chapter 17: Reflection, Attributes, and Dynamic Programming 651Reflection 652Attributes 663Programming with Dynamic Objects 688Summary 699 Chapter 18: Multithreading 701Running and Controlling a Separate Thread 706Executing Iterations in Parallel 724Running LINQ Queries in Parallel 734Multithreading before .NET Framework 4 738Unhandled Exceptions on the AppDomain 744Summary 746 Chapter 19: Synchronization and More Multithreading Patterns 749Synchronization 750Timers 778Asynchronous Programming Model 783Asynchronous Delegate Invocation 797Event-Based Asynchronous Pattern (EAP) 801Background Worker Pattern 804Windows UI Programming 809Summary 814 Chapter 20: Platform Interoperability and Unsafe Code 815Platform Invoke 816Pointers and Addresses 830Summary 839 Chapter 21: The Common Language Infrastructure 843Defining the Common Language Infrastructure (CLI) 844CLI Implementations 845C# Compilation to Machine Code 847Runtime 849Application Domains 854Assemblies, Manifests, and Modules 855Common Intermediate Language (CIL) 858Common Type System (CTS) 858Common Language Specification (CLS) 859Base Class Library (BCL) 860Metadata 860Summary 862 Appendix A: Downloading and Installing the C# Compiler and the CLIPlatform 865Appendix B: Full Source Code Listings 869Appendix C: Concurrent Classes from System.Collections.Concurrent 895Appendix D: C# 2.0 Topics 899Appendix E: C# 3.0 Topics 903Appendix F: C# 4.0 Topics 905 Index 907

About the Author

Mark Michaelis is founder and president of IntelliTechture and a trainer with IDesign. His expertise encompasses software architecture, VSTS/TFS, BizTalk, SharePoint, and .NET. He has been honored as a Microsoft MVP for C#, Visual Studio Team System, and the Windows SDK, and is a Microsoft Regional Director. He serves on Microsoft's C# software design review team and often speaks at developer conferences.


Praise for Essential C# 4.0 "If you want to be a C# developer, or if you want to enhance your C# programming skills, there is no more useful tool than a well-crafted book on the subject. You are holding such a book in your hands." -From the Foreword by Charlie Calvert, Community Program Manager, Visual C#, Microsoft "It's essential!"-Eric Lippert, Senior Engineer, Microsoft; coauthor, Visual Studio Tools for Office 2007 "Essential C# 4.0 continues the tradition of prior editions-the definitive work on C# the language and how to effectively code using it. This book covers all aspects of the language, from the basics to highly advanced topics; the reader doesn't just emerge understanding the language of C#, but emerges as a better developer.-Troy Magennis, C# MVP and creator of "I've been involved with C# since its earliest days and remember vividly a conversation with Anders Hejlsberg in which we discussed what C# didn't have when compared to C++ at the time. He spoke of simplicity and compact design but it was plain that C# didn't have the muscle to compete with C++ in those early days. Here we are, almost a decade later, with the latest incarnation of C# ready to go and the difference is huge. The elegance of C# is still there but the power of the language has advanced by leaps and bounds. Now, C# is second to none and may be first among equals. An important aspect to remember is that C# is the language but it is the .NET framework that empowers our expression as developers. Essential C# 4.0 presents both the language and the important aspects of that framework in a clear and concise manner that makes this book a great tool for learning the language and also covers aspects of general programming that are, well, essential."-Bob Powell, C# MVP, "Essential C# 4.0 is a book that anyone who wants to be an expert C# programmer should own. It's a rare book that is on both my short list of books that I recommend for experts and my short list of books that I recommend for programmers new to C#."-Peter Ritchie, President, Peter Ritchie Inc. Software Consulting; Microsoft C# MVP "Let Mark Michaelis serve as your guide from novice to expert C# developer. If you've never used C#, read this book carefully for a complete guided tour of the language. If you're already familiar with C#, you'll still find plenty to learn. Mark's coverage of the language is very complete, including the latest techniques in the C# 4.0 additions. This book is and will remain within easy reach. It's a ready reference that every C# developer should have handy."-Bill Wagner, Founder, SRT Solutions; Microsoft Regional Director; author of Effective C# and More Effective C#

Ask a Question About this Product More...
Write your question below:
Look for similar items by category
Home » Books » Computers » Programming » C#
People also searched for
How Fishpond Works
Fishpond works with suppliers all over the world to bring you a huge selection of products, really great prices, and delivery included on over 25 million products that we sell. We do our best every day to make Fishpond an awesome place for customers to shop and get what they want — all at the best prices online.
Webmasters, Bloggers & Website Owners
You can earn a 8% commission by selling Essential C# 4.0 on your website. It's easy to get started - we will give you example code. After you're set-up, your website can earn you money while you work, play or even sleep! You should start right now!
Authors / Publishers
Are you the Author or Publisher of a book? Or the manufacturer of one of the millions of products that we sell. You can improve sales and grow your revenue by submitting additional information on this title. The better the information we have about a product, the more we will sell!
Item ships from and is sold by, Inc.
Back to top