I appreciate your comments. Great feedback. Keep in mind that most books like these are are written with Beta 1 and early Beta 2 bits, so things like this, things that you are finding, occur. So, let me answer your questions this way:
1) You have every right to post a question to the publisher and even author the second you find a non-working example. I would preface this, however, like you have done, you spend a few minutes making sure that you have "questioned your own context". For example, in this case, the Add method doesn't even exist and therefore I would be posting a question almost immediately.
2) There is not a blank and white answer here, but even I as a reader expect examples to work but know that releases change and what worked in one release won't work in another. I don't think there is a quick method, but I typically post a question to the author or forum after I have tried a few things on my own or have done a few BING/Google searches. There are also things that are out of our control.
For example, I have recieved a number of emails from readers who purchased my WCF book. Many of the examples worked up until they applied a Windows update then all of a sudden the examples quit working. At that point I just throw up my hands and say "what the...?" and ask Microsoft about it.
3) This is a tough one. I love writing books, but I hate using early beta releases to use for examples. The problem is publishers want to be the first out, and to go through all the examples again right before the book goes to publication with the latest release is very time consuming. And we as readers hope that mistakes like this are rare.
I think the answer likes on both sides. I need to be better at providing addendum's for the book. I'll focus on that. You and every other reader are free to email me asking questions such as this. Because things like this keep me in check and more importantly keep me honest. :-)
Hope this helps...
__________________
========================
Scott Klein
Author of:
Professional SQL Server 2005 XML
Professional WCF Programming: .NET Development with the Windows Communication Foundation
Professional LINQ
========================
|