p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 (http://p2p.wrox.com/forumdisplay.php?f=228)
-   -   Errata - Chapter 9, Page 299, C# (http://p2p.wrox.com/showthread.php?t=47081)

RobC August 28th, 2006 07:32 PM

Errata - Chapter 9, Page 299, C#
 
Code:

string[,] MyArray = new string[3, 3];
should be:
Code:

string[,] MyArray = new string[4, 4];
and
Code:

string[, ,] MyArray2 = new string[3, 3, 3];
should be:
Code:

string[, ,] MyArray2 = new string[4, 4, 4];

DaveSussman August 30th, 2006 03:03 AM

These are errors; in C# arrays are declared with the number of items, but the indexing starts from 0 when you index into the array. So it's declared with 4 items, but contains items 0-3.

Interestingly, these were correct in my original chapter. I'll check the edits to see where this crept in.



All times are GMT -4. The time now is 05:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.