Ch 11 AgrumentOutOfRangeException
I was wondering if there was an error in the code provided in the book for Adding a Cards Collection to CardLib (pg 288). I have checked over my code several times to verify it matches the book, but when I run it I get an ArgumentOutOfRangeException and this message: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
I have VS2010 Ultimate. The Locals show the following:
this {Ch11CardLib.Cards}
cardIndex 40
value {The Ace of Clubs}
When I stop debugging and start again, it always crashes out at the Ace of Clubs
Thoughts?
|