Wrox Programmer Forums
|
BOOK: Beginning Visual C# 2010
This is the forum to discuss the Wrox book Beginning Visual C# 2010 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, ; ISBN: 9780470502266
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2011, 06:56 PM
Registered User
 
Join Date: Feb 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?
 
Old February 10th, 2011, 05:28 PM
Registered User
 
Join Date: Feb 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, I found the error.

In the Shuffle() method in the Deck class, I forgot to change a line of code.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with jquery ch 11 nzg5 BOOK: Beginning ASP.NET 4 : in C# and VB 16 February 25th, 2012 10:49 PM
Problem with jquery ch 11 nzg5 BOOK: Beginning ASP.NET 4 : in C# and VB 1 October 4th, 2010 11:57 AM
Ch 11 Question tixrus BOOK: Beginning JavaScript and CSS Development with jQuery 0 April 11th, 2010 05:23 PM
Ch 11 Pg459 Exercise 5 C# brivad BOOK: Beginning ASP.NET 1.0 0 September 10th, 2007 08:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.