The C# Player’s Guide, 2nd Edition

The C# Player’s Guide, 2nd Edition

English | 2015 | ISBN: 978-0-9855801-2-4 | 369 Pages | PDF | 10 MB


The C# Player’s Guide (2nd Edition) is the ultimate guide for people starting out with C#, whether you are new to programming, or an experienced vet. This guide takes you from your journey’s beginning, through the most challenging parts of programming in C#, and does so in a way that is casual, informative, and fun.
This version of the book is updated for C# 6.0, .NET 4.6, and Visual Studio 2015

  • Get off the ground quickly, with a gentle introduction to C#, Visual Studio, and a step-by-step walkthrough and explanation of how to make your first C# program.
  • Learn the fundamentals of procedural programming, including variables, math operations, decision making, looping, methods, and an in-depth look at the C# type system.
  • Delve into object-oriented programming, from start to finish, including inheritance, polymorphism, interfaces, and generics.
  • Explore some of the most useful advanced features of C#, and take on some of the most common tasks that a programmer will tackle.
  • Learn to control the tools and tricks of programming in C#, including the .NET framework, dealing with compiler errors, and hunting down bugs in your program.
  • Master the needed skills by taking on a large collection of Try It Out! challenges, to ensure that you’ve learned the things you need to.
+

C# and .NET Versions

C# has gone through quite a bit of evolution over its history. The first release was in 2002, and established the bulk of the language features C# still has today. A little over a year later, in 2003, C# 2.0 was released, adding in a lot of other big and powerful features, most of which will get quite a bit of attention in this book (generics, nullable types, delegates, static classes, etc.)

The next release, C# 3.0, expanded the language in a couple of very specific directions: LINQ and lambdas, both of which get their own chapters in this book.

The next two releases were somewhat smaller. C# 4.0 added the dynamic keyword, as well as named and optional method arguments. C# 5.0 added the async keyword, and better support for multi-threaded development.

In the C# 5 era, a new C# compiler was introduced: Roslyn. This compiler has a number of notable features: it’s open source, it’s written in C# (written in the language it’s for), and it is available while your program is running (so you can compile additional code dynamically). Something about its construction also allows for people to more easily tweak and experiment with new features, which led to the features added in C# 6.0.

C# 6.0 adds a whole slew of little additions and tweaks across the language. While previous updates to the language could usually be summed up in a single bullet point or two, and are given their own chapters in this book, the new features in C# 6.0 are small and numerous. I try to point out what these new features are throughout this book, so that you are aware of them.

Alongside the C# language itself, both Visual Studio and the Base Class Library have both been evolving and growing. This book has been updated to work with Visual Studio 2015, .NET 4.6, and C# 6.0 at the time of publishing.

Future versions will, of course, arrive before long. Based on past experience, it’s a pretty safe bet to say that everything you learn here in this book will still apply in future versions as well.