C# 4.0 in a Nutshell: The Definitive Reference

Author: Joseph Albahari, Ben Albahari
All Stack Overflow 10
This Month Stack Overflow 3


by anonymous   2019-07-21

C# 4.0 in a nutshell by o reilly publications


by anonymous   2019-07-21

I have a few books that I still use now but basically I favour WROX, Apress and O'Reilly above anything else.

I used the 3.5 Version of this throughout Uni and found it to be a great resource, one of the best books I own.
The examples are very clear and easy to understand and it covers a lot of areas, also it is fairly compact and easy to shove in a bag to take with you which is a bonus compared to the WROX books.

I have this and find it useful even now when revising for job interviews etc, It explains a lot of the concepts of programming c# and whilst its not going to be much use if you want a book full of coding examples I still highly recommend getting it.

I also have the WROX Beginners / Pro C# 3.5 which I used a lot when I was at uni, the 4.0 version is out now ( Here ) but you can probably pick up the 3.5 on Amazon marketplace quite cheaply. These books are like phonebook thick and great to have lying around as a reference.

by anonymous   2019-07-21

For an ASP.NET MVC introduction, definitely check out the NerdDinner tutorial:


It does cover the basic concepts of Web development using ASP.NET MVC and the advantages of using the Model,View, Controller approach at a high level. However, you will want to learn the C# syntax before diving into it. I would suggest picking up a book that gives a nice introduction such as C# in a nutshell.

by anonymous   2017-08-20

From the C# 4.0 in a Nutshell:

There are currently some practical limitations on what PLINQ can parallelize. These limitations may loosen with subsequent service packs and Framework versions. The following query operators prevent a query from being parallelized, unless the source elements are in their original indexing position:

  • Take, TakeWhile, Skip, and SkipWhile
  • The indexed versions of Select, SelectMany, and ElementAt

Most query operators change the indexing position of elements (including those that remove elements, such as Where). This means that if you want to use the preceding operators, they’ll usually need to be at the start of the query

So, in fact, using TakeWhile prevents the .AsParallel() from parallelizing. It is hard to say why Where kills the subscriptiion, but putting it before AsParallel might fix the problem.

by anonymous   2017-08-20

C# 4 is basically a superset of all the other versions, so if you know C# 4 then you definitely know the earlier versions. On the other hand, I think it's worth knowing what's in which version. I have a couple of "bluffer's guides" on my C# in Depth web site which give a bit of information about C# 2 and 3 - I'll do a similar one for C# 4 soon. See this question for a very brief list of features in each version.

As for migrating from C and C++ - try to ignore everything you think you know. Some bits will be similar, some will be completely different. You should try to work the way the language expects you to, rather than applying C++ idioms to it.

You might want to read Essential C# 4.0, C# 4.0 in a Nutshell or Accelerated C# 2010. My own book - C# in Depth - will have a second edition soon, covering C# 4, but it's really designed for people who already know C# 1.

by anonymous   2017-08-20

Jon Skeet has an entire chapter dedicated to them in the 2nd edition of C# in Depth. It's roughly 40 pages based on the last MEAP update. This isn't final since, as Joel mentioned, it's not out yet, but you could buy it and get access to the MEAP releases: http://www.manning.com/skeet2/

C# 4.0 in a Nutshell covers it in Ch. 13, "Diagnostics and Code Contracts." Based on the chapter headings in the table of contents I estimate ~17 pages on the topic.

I imagine Andrew Troelsen's Pro C# 2010 and the .NET 4 Platform book will cover it, but I wasn't able to find a TOC for it.