View Single Post
  #1 (permalink)  
Old July 4th, 2003, 09:56 AM
dchernin dchernin is offline
Registered User
 
Join Date: Jul 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default C# Class Design Handbook

In the discussion of GetHashCode on pp. 80-81, the authors state that the "hash code should be based on immutable members". Yet, in the example, it is partially based on the "balance" member, which doesn't seem immutable to me. Am I missing something here, or is there an inconsistency between the rules and the example?

Thanks...

Dan

P.S. BTW, I'm finding this book well-written, concise and informative in a detailed way.