Browse by Tags

All Tags » 1st edition (RSS)
Errata below represent the first edition
The second edition of Effective C# is almost out. That means it's time for a little maintenance to the errata page. All items older than this marker are part of the first edition. Also, you can use...

Posted by wwagner | with no comments

Filed under: ,

error in Item 5, p. 37
Missing format string On page 37, in item 5, the line of code that reads: Console.WriteLine( string.Format( new CustomerFormatter(), "", c1 ); should read: Console.WriteLine( string.Format( new...

Posted by wwagner | with no comments

Filed under: ,

P 19, (item 3)
missing char The code at the bottom of p. 19 reads: //Version two try { MyType t1; t = (MyType)o; It should be: try { MyType t1; t1 = (MyType)o;

Posted by wwagner | with no comments

Filed under: ,

p. 122 (Item 19)
Wrong word in 3rd paragraph The second sentence in the third paragraph reads: "It [IListSource] also has a containsListCollection property so that users can modify the overall structure of the collection...

Posted by wwagner | with no comments

Filed under: ,

Poor word choice in Item 3
You could easily mis-interpret what I said about the as and is operators At the bottom of page 18, in Item 3, I wrote this sentence: "If a particular object is not the requested type or is derived...

Posted by wwagner | with no comments

Filed under: ,

Errata: Item 10
p. 63. Item 10 incorrectly implies that System.ValueType contains a static operator ==. It doesn't. However, many developers do create what seems like a simple solution: struct MyType { // data members...

Posted by wwagner | with no comments

Filed under: ,

Clarification: Item 22
Elided code was not clearly marked Both listener classes on p. 134 should include a private declaration of the Logger Singleton class: private static Logger logger; This declaration was removed from the...

Posted by wwagner | with no comments

Filed under: ,

Errata: p. 24
2nd paragraph The sentence "The as operator returns true ..." Should read "The is operator returns true ..."

Posted by wwagner | with no comments

Filed under: ,

Errata: p24
missing words The sentence that says, "If you made a create a Newtype" should be "If you made a new class derived from Newtype"

Posted by wwagner | with no comments

Filed under: ,

Errata: Missing words on p. 144
There really was a full sentence there p. 144, Item 24, contains the following sentence: " The DefaultSort attribute e, the Name property." What should be there is this: "The DefaultSort...

Posted by wwagner | with no comments

Filed under: ,

Exceptional conditions about exceptions
A number of subtle points about exception processing. This is one of those lengthy discussions that get filed under “There are always exceptions”. And, it happens to be related to the guidance...

Posted by wwagner | with no comments

Filed under: ,

.NET Framework changes affecting Items 9, 10
The advice is still proper, but the justification is somewhat different. The 2.0 version of the .NET framework has changed the way they implement ValueType.Equals() and ValueType.GetHashCode(). This affects...

Posted by wwagner | with no comments

Filed under: , ,

Question on Array Recommendations
They are slightly different than those from the P & P Guide. Question on Array Recommendations. I finished your book a few days ago. It was a fun read, and I think you covered a lot of good areas for...

Posted by wwagner | with no comments

Filed under: ,

Questions and answers about events and threads
This pertains to Item 22, and Item 45. Question 1: Can you further explain the idiom you recommend on top of page 133 (see below) to raise an event. Specifically, how does making a copy of the reference...

Posted by wwagner | with no comments

Filed under: , ,

P. 111, Item 17
Implement the Standard Dispose Idiom At the bottom of the page, the line: GC.SuppressFinalization( true ); should be: GC.SuppressFinalize( this ); Found by Barrie Green.

Posted by wwagner | with no comments

Filed under: ,

More Posts Next page »