EDN Admin
Well-known member
Ok, my book really sucks I think.
After struggling with an example in the book, I looked in the MSDN and searched these forums.
I believe my book is wrong when it shows:
int[,] student = new in[4][3];
I tried doing it that way but it errors.
<pre class="code int[,] student = new int[5,4];
gives me no error and works.
I am going to go with that.
Unless someone can tell me that int[,] student = new in[4][3]; is indeed a correct format or what kind of a typing error it could be...
The following also seems to be in the wrong format:
int[][] x = { { 2, 3 }, { 4, 5 }, { 6, 7 } };
I dont think you can do it that way...
[/code]
View the full article
After struggling with an example in the book, I looked in the MSDN and searched these forums.
I believe my book is wrong when it shows:
int[,] student = new in[4][3];
I tried doing it that way but it errors.
<pre class="code int[,] student = new int[5,4];
gives me no error and works.
I am going to go with that.
Unless someone can tell me that int[,] student = new in[4][3]; is indeed a correct format or what kind of a typing error it could be...
The following also seems to be in the wrong format:
int[][] x = { { 2, 3 }, { 4, 5 }, { 6, 7 } };
I dont think you can do it that way...
[/code]
View the full article