Theme:
v
C# Books

If you want to learn Microsoft .Net Programming with C#, here are the books I recommend.
You don't need to buy all these books of course: just a few of them will help you a lot get started learning C#.

Here are my 7 most recommended books:


C# 5.0 in a Nutshell
*****
ISBN:1449320104, 9781449320102
Publisher:O'Reilly Media, Inc.
Date Published:2012, 5th Edition
Author:Joseph Albahari, Ben Albahari
Pages:1042

Description:

When you have a question about C# 5.0 or the .NET CLR, this bestselling guide has precisely the answers you need. Uniquely organized around concepts and use cases, this updated fifth edition features a reorganized section on concurrency, threading, and parallel programming—including in-depth coverage of C# 5.0’s new asynchronous functions. Shaped by more than 20 expert reviewers, including Microsoft’s Eric Lippert, Stephen Toub, Chris Burrows, and Jon Skeet, this book has all you need to stay on track with C# 5.0. It’s widely known as the definitive reference on the language.

  • Get up to speed on C# language basics, including syntax, types, and variables
  • Explore advanced topics such as unsafe code and type variance
  • Dig deep into LINQ via three chapters dedicated to the topic
  • Learn about code contracts, dynamic programming, and parallel programming
  • Work with .NET features, including reflection, assemblies, memory management, security, I/O, XML, collections, networking, and native interoperability
"C# 5.0 in a Nutshell is one of the few books I keep on my desk as a quick reference."
—Scott Guthrie, Microsoft
"Whether you’re a novice programmer or an expert who wants to improve your knowledge of modern asynchronous programming techniques, this book has the information you need to get the job done in C#."
—Eric Lippert, Microsoft

My Comment:

In my opinion, this book is definitely the best Reference book on C#: it's complete, it contains top examples. It is an update of the "C# 4.0 in a Nutshell" book with new chapters for the C# 5.0 enhancements. It should be the first book you purchase if you want to learn C#.


Microsoft Visual C# 2012 - Step by Step
*****
ISBN:ISBN 978-0-7356-6801-0
Publisher:Microsoft Press
Date Published:2012
Author:John Sharp
Pages:848

Description:

Teach yourself how to build applications with Microsoft Visual C# 2012 and Visual Studio® 2012—one step at a time. Ideal for those with fundamental programming skills, this tutorial provides practical, learn-by-doing exercises for mastering core C# language features and creating working applications and components for Windows®.
Discover how to:

  • Work with variables, non-reserved identifiers, statements, operators, and methods
  • Use the new application models provided by Windows 8 and the Windows Runtime
  • Create interfaces and define abstract classes
  • Manage errors and exception handling
  • Use collection classes
  • Work with databases by using DataBinding with the Entity Framework
  • Respond to user input and gestures; gather input from devices and other sources
  • Handle events arising from multiple sources
  • Develop your first Windows 8 apps

My Comment:

This is an excellent Tutorial on learning C# 5.0 explaining all its basic elements clearly . I highly recommend this book. I however now find myself most often using C# 5.0 in a Nutshell as it is more of a Reference book.


Linq to Objects Using C# 4.0
*****
ISBN:ISBN 0321637178, 9780321637178
Publisher:Pearson Education
Date Published:2010
Author:Troy Magennis
Pages:336

Description:

Using LINQ to Objects, .NET developers can write queries over object collections with the same deep functionality that was once available only with SQL and relational databases. Now, for the first time, developers have a comprehensive and authoritative guide to applying LINQ to Objects in real-world software. Microsoft MVP Troy Magennis introduces state-of-the-art techniques for working with in-memory collections more elegantly and efficiently—and writing code that is exceptionally powerful, robust, and flexible. Drawing on his unsurpassed experience coding software using LINQ and hosting the popular HookedOnLINQ.com site, Magennis presents timely, realistic solutions to a wide spectrum of development challenges, such as combining data from multiple sources, and achieving optimal performance with extremely large sets of data. You’ll begin with brief quick-starts that walk you through LINQ to Objects’ key features and query syntax. Next, you’ll drill down to detailed techniques for applying and extending these features with C# 4.0 and C# 3.0—including code examples that reflect the realities of production development. Coverage includes:

  • Writing basic LINQ queries with C#: filtering, projecting, and sorting data from in-memory collections
  • Mastering advanced techniques for grouping and joining data and understanding the performance implications of each technique
  • Taking full advantage of LINQ’s standard query operators
  • Creating custom query operators that follow best practices for coding patterns and error handling
  • Writing more fluent, readable LINQ queries with C# 4.0’s language enhancements, including the new dynamic features
  • Combining LINQ with COM-Interop to access data sources such as Microsoft Excel
  • Using Parallel LINQ to Objects (PLINQ) to optimize queries for multi-core processors, and how to build custom parallel query operators
  • Integrating the best LINQ to Objects patterns into your day-to-day coding

My Comment:

Linq is a must have skill for a C# developer: it allows you to easily manipulate your collections of objects in all kinds of ways without looping.


Pro LINQ -- Language Integrated Query in C# 2010
*****
ISBN:ISBN 1430226536, 9781430226536
Publisher:Apress
Date Published:2010
Authors:Joseph Rattz, Adam Freeman
Pages:840

Description:

LINQ is the part of the .NET Framework that provides a generic approach to querying data from different data sources. It has quickly become the next must-have skill for .NET developers. Pro LINQ: Language Integrated Query in C# 2010 is all about code. Literally, this book starts with code and ends with code. Most books show the simplest examples of how to use a method, but they so rarely show how to use the more complex prototypes. This book is different. Demonstrating the overwhelming majority of LINQ operators and prototypes, it is a veritable treasury of LINQ examples. Rather than obscure the relevant LINQ principles in code examples by focusing on a demonstration application you have no interest in writing, this book cuts right to the chase of each LINQ operator, method, or class. However, where complexity is necessary to truly demonstrate an issue, the examples are right there in the thick of it. For example, code samples demonstrating how to handle concurrency conflicts actually create concurrency conflicts so you can step through the code and see them unfold. Face it, most technical books, while informative, are dull. LINQ need not be dull. Written with a sense of humor, this book will attempt to entertain you on your journey through the wonderland of LINQ and C# 2010. What you’ll learn:

  • How to leverage all the new LINQ relevant C# 2008 language features including extension methods, lambda expressions, anonymous data types, and partial methods.
  • How to use LINQ to Objects to query in-memory data collections such as arrays, ArrayLists, and Lists to retrieve the data you want.
  • Why some queries are deferred, how a deferred query can bite you, and how you can make deferred queries work for you.
  • How to use LINQ to XML to revolutionize your creation, manipulation, and searching of XML data.
  • How to query DataSets with LINQ to DataSet so you can coexist with legacy code and use LINQ to query databases other than SQL Server.
  • How to query Databases with LINQ to SQL, write your own entity classes, and understand how to handle concurrency conflicts.

My Comment:

This second book about Linq presents the major flavors of Linq through many simple examples.


Programming Entity Framework Code First
*****
ISBN:ISBN 1449323847, 9781449323844
Publisher:O'Reilly Media, Inc.
Date Published:2011
Authors:Julia Lerman, Rowan Miller
Pages:194

Description:

Take advantage of the Code First data modeling approach in ADO.NET Entity Framework, and learn how to build and configure a model based on existing classes in your business domain. With this concise book, you’ll work hands-on with examples to learn how Code First can create an in-memory model and database by default, and how you can exert more control over the model through further configuration. Code First provides an alternative to the database first and model first approaches to the Entity Data Model. Learn the benefits of defining your model with code, whether you’re working with an existing database or building one from scratch. If you work with Visual Studio and understand database management basics, this book is for you.

  • Learn exactly what Code First does—and does not—enable you to do
  • Understand how property attributes, relationships, and database mappings are inferred from your classes by Code First
  • Use Data Annotations and the Fluent API to configure the Code First data model
  • Perform advanced techniques, such as controlling the database schema and overriding the default model caching
This book is a continuation of author Julia Lerman’s Programming Entity Framework, widely recognized as the leading book on the topic.

My Comment:

This small book along with its companion book (Programming Entity Framework Code First) is an absolute must if you need to write C# applications using databases. Only drawback is that the book does not have any Index.


Programming Entity Framework DbContext
*****
ISBN:ISBN 1449312969, 9781449312961
Publisher:O'Reilly Media, Inc.
Date Published:2012
Authors:Julia Lerman, Rowan Miller
Pages:238

Description:

The DbContext API captures Entity Framework’s (EF) most commonly used features and tasks, simplifying development with EF. This concise book shows you how to use the API to perform set operations with the DbSet class, handle change tracking and resolve concurrency conflicts with the Change Tracker API, and validate changes to your data with the Validation API. With DbContext, you’ll be able to query and update data, whether you’re working with individual objects or graphs of objects and their related data. You’ll find numerous C# code samples to help you get started. All you need is experience with Visual Studio and database management basics.

  • Use EF’s query capabilities to retrieve data, and use LINQ to sort and filter data
  • Learn how to add new data, and change and delete existing data
  • Use the Change Tracker API to access information EF keeps about the state of entity instances
  • Control change tracking information of entities in disconnected scenarios, including NTier applications
  • Validate data changes before they’re sent to the database, and set up validation rules
  • Bypass EF’s query pipeline and interact directly with the database

My Comment:

This small book along with its companion book (Programming Entity Framework DbContext) is an absolute must if you need to write C# applications using databases Only drawback is that the book does not have any Index.


Data Binding with Windows Forms 2.0
*****
ISBN:ISBN 0321630106, 9780321630100
Publisher:Pearson Education
Date Published:2006
Authors:Brian Noyes
Pages:736

Description:

Data binding is the most important part of many business applications–and one of the most difficult things to understand. Data Binding with Windows Forms 2.0 is the first book to focus on this crucial area of development. It will quickly get you up to speed on binding data sources to Windows Forms components. The book contains clear examples in C# that work with SQL Server 2000 and SQL Server 2005. Visual Basic .NET examples are available on the book’s Web site. Brian Noyes, leading consultant and speaker on .NET programming, teaches you both the theory and practice of data binding and provides numerous samples ready to run in Visual Studio 2005. From his in-depth coverage, you’ll learn how to:

  • Use Visual Studio 2005 to generate a data-bound application from a database
  • Use the new Visual Studio 2005 typed data set designer, and how and why to use typed data sets and typed data adapters
  • Perform simple and complex binding of data to controls, and how to use the .NET 2.0 BindingSource
  • Use the Binding object for simple binding with automatic formatting, and how to handle binding events
  • Generate bound controls with the Visual Studio Designer, and how to use Data Sources
  • Present data with the new DataGridView control, and how to implement advanced features of the DataGridView
  • Implement custom data-bound controls in Windows Forms
  • Create custom business objects and collections that are suitable for use in data binding
  • Implement validation and error handling at the Windows Forms and data-binding levels
  • Implement data binding with ASP.NET 2.0 and the upcoming Windows Presentation Foundation (Avalon) technologies

My Comment:

Although pretty old now, this book is essential if you want to be able to write Windows Forms application the right way. It's all about binding your data to User Interface controls and validating your data i.e. the things you have to do (and to do right) in any application you write.