tags:

views:

186

answers:

4

Background

Very few of the .NET and C# books I've read actually cover real world examples and uses for C#. For example we learn about collections and other useful aspects of the language but I haven't seen a book that explains when to use them.

Question

Is there a book that covers real world uses for various parts of the C# language and .NET Framework?

+1  A: 

It would be hard for a book to cover real world practices because they are diverse. The best way is to learn as much as you can about the technology you work in (.net or otherwise). Then, when something comes up in the real world, you will think "Oh, that sounds like a job for [insert concept here]"

If you have a non-.net book that you would like a .net equivalent to, add it to your question and I will see if I can think of something similar.

BioBuckyBall
+4  A: 

The real world is messy, analog, full of constant change, gray areas, and ambiguity.

That is why books insist on teaching us how to create classes representing silly things like cats and fruit.

Choosing which features and classes to use in your application is an art and a science, many times there is no "right" answer, just a "best" answer based on your particular situation w/r/t scaling, future plans, current load, code reuse, readability, etc.

Specifically regarding Collections, a strong fundamental understanding of the underlying data structures is key to making the right decisions. Fortunately, any decent CS degree plan will include classes specifically on data structures and algorithms. Once you understand what is under the hood, the right answers are usually pretty easy to come by.

All that said, I've heard good things about StackOverflow uber-user Jon Skeet's book on C#, you may want to give it a look:

http://www.amazon.com/C-Depth-Jon-Skeet/dp/1933988363

A new revision is due out soon, IIRC, so you may want to hold off on purchase.

richardtallent
If you pre-order the second edition, you can get a free e-book of the first and early access to new chapters. Its a sweet deal.
CaptnCraig
The ebook only of the second edition is going to be just $10 on Sunday... you heard it here first.
Jon Skeet
+1  A: 

we use collections in every day use all the time. i'm not sure there's a page in our website that doesn't use some kind of collection whether it be a simple Array, a List<T> IEnumerable<T> or whatever. I think you need to explain what you mean by "real world".

Chris Conway
+2  A: 

I have enjoyed having The C# Cookbook around. It isn't a book I would ever sit down and read in one sitting, but it has quite a few useful things in it. I would also recommend getting c# in depth. It is not so much practical, but you will learn amazing things about the language and become a better programmer.

Also not a c# book specifically, but Head first design patterns is extremely well done and actually fun to read, which is rare for tech books. Design patterns will help you in the real world more than understanding your specific language features will, in my opinion.

CaptnCraig