In a perfect world, you can take your time to learn a new language. Perhaps take some classes, maybe study some books, and take the time to really hone your craft. Then again, if you are involved in information technology in the 21st century, while you are doing all that, someone else has just stolen your job and you are left out in the cold.
I’ve been there. If you haven’t, you will. You want to move ahead in your career, but the only way is to have some experience to take on the next challenge. Perhaps it is an opportunity in your current job, or maybe for a new employer, but they need someone with skills in C#. You don’t have the time and money to take classes, and you don’t want to waste your time learning about if statements and for loops. You have some skills. That is where Accelerated C# 2008 comes in.
Accelerated C# 2008 was written to narrow that learning curve down so that you can quickly develop a true C# expertise. By presenting the right things and showing you the right way to use them, the author hopes to rid you of years of trial-and-error experience and get you coding like a C# expert. It is expected that you have some working knowledge of an object-oriented programming language such as C++, Java, or Visual Basic.NET. Accelerated C# 2008 is 510 pages and is divided into 16 chapters.
Chapter 1, “C# Preview,” begins with an introduction into the C# programming environment, the differences between C# programming, and native C++ environment. You will get some fundamental of what a C# application looks like and how it works, as well as an overview of C# 2.0 and 3.0.
Chapter 2, “C# and the CLR,” continues where chapter one left off and takes on the challenge of the managed environment that a C# application runs in: the Common Language Runtime (CLR). Here you are introduced to the basic building blocks of applications, assemblies, and how meta-data can make assemblies self-describing. You will also see how the CLR compiles, packages, and executes C# programs.
Chapter 3, “C# Syntax Overview,” begins with a survey of the C# language. There is an expectation that you have some experience with C++ and/or Java and so builds from there, and then explores the two fundamental types within the CLR: the value types and reference types. Also explained are namespaces and how they can be used to logically partition types and functionality within your applications. Chapter 4, “Classes, Structs, and Objects,” shows that everything is an object. Here you learn how to define types in C#, you learn more about value and reference types in the CLR, and you will see how inheritance works in C# as well as how every object derives from the System.Object type. There is also a lot of information on the managed environment as well.
Chapter 5, “Interfaces and Contracts,” explores interface-based programming and what kind of role it plays within the C# language. You should always design the interface first since it is the contract between components. The contract then drives the implementation.
Chapter 6, “Overloading Operators,” examines how you can provide custom functionality for the built in operators when applied to your own defined types, but just because you can do something doesn’t mean that you always should. If not done properly, overloaded operators can make your code more difficult to read and understand.
Chapter 7, “Exception Handling and Exception Safety,” describes the exception handling abilities of the C# language and the CLR. Described here also is some of the new capabilities that were added to the .NET 2.0 runtime for creating more fault-tolerant code than was possible in .NET 1.1. You will learn that writing exception safe code can be difficult to master without the right training.
Chapter 8, “Working with Strings,” talks about working with strings and how they are a first class type in the CLR. Covered here is formatting, working with the StringBuilder, regular expressions, and globalization capabilities of the framework.
Chapter 9, “Arrays, Collection Types, and Iterators,” covers the various array and collection types in C#. You will learn a bit about arrays, but even more about the major generic collection interfaces and iterators as well as what kind of things you can do with them.
Chapter 10, “Delegates, Anonymous Functions, and Events,” examines the mechanisms used in C# to provide callbacks and how C# implements into callable objects called delegates. You will also see how the framework builds upon delegates to provide a publish/subscribe event notification mechanism.
Chapter 11, “Generics,” shows you how to provide a shell of functionality with which to define more specific types at runtime. Generics allow you to create open-ended types that are converted into closed types at runtime.
Chapter 12, “Threading in C#,” explains what is needed to create multi-threaded applications in C#. The managed environment of the CLR has provided more infrastructures for making your job much easier, but you still have to be careful. You will learn about synchronizing and using the threadpool as well.
Chapter 13, “In Search of C# Canonical Forms,” is a discussion on best design practices for defining new types and how to make them safe for consumers. You will learn about reference and value type canonical forms.
Chapter 14, “Extension Methods,” is a new feature in C# 3.0 for extending a type, like an instance method, but much more. Using extension methods, you can declare methods that appear to augment the public interface, or contract of a type, but since they are not really instance methods, they cannot crack the shell of encapsulation on the type that they are extending.
Chapter 15, “Lambda Expressions,” are another new feature in C# 3.0 in which you can declare and instantiate delegates using lambda expressions. Here you will learn of the two forms that they can take: lambda statements, which are a replacement for anonymous methods, and the more abbreviated form to declare an anonymous method, the lambda expression.
Chapter 16, “LINQ: Language Integrated Query,” shows you how to integrate data queries into your code. Here you learn how LINQ forms a bridge between C#’s imperative programming style and a data-acquisition languages functional nature. While there are several implementations of LINQ available, here the focus is on LINQ to Objects.
Accelerated C# 2008 is incredibly well thought out and well executed. This is not really a beginner’s book, although with additional resources, beginners could benefit from it. It is really a book for someone who has been programming and using object-oriented programming, and has a solid foundation in object-oriented programming.
Throughout Accelerated C# 2008, everything from the progression of learning, right down to the examples are purposeful. For this type of book to come off properly, and not appear rushed, it has to be well thought out, since you are taken down paths very rapidly. You don’t spend a lot of time on any one topic, but where you do spend time, it is well spent. No real fluff here.
The other real strength is the explanation of the new language features. The author makes them not only understandable, but they make sense as well. If you need to get up to speed quickly with C# 2008, Accelerated C# 2008 will guide you through the process quickly and motivate you to really understand C#. I highly recommend this book.Powered by Sidelines