Jagged arrays in C#
Posted
by chupinette
on Stack Overflow
See other posts from Stack Overflow
or by chupinette
Published on 2010-05-31T08:29:16Z
Indexed on
2010/05/31
8:32 UTC
Read the original article
Hit count: 490
c#
|jagged-arrays
Hello! Im trying to store to array of ints in a jagged array:
while (dr5.Read())
{
customer_id[i] = int.Parse(dr5["customer_id"].ToString());
i++;
}
dr5 is a datareader. I am storing the customer_id in an array, i also want to store scores in another array. I want to have something like below within the while loop
int[] customer_id = { 1, 2 };
int[] score = { 3, 4};
int[][] final_array = { customer_id, score };
Can anyone help me please ?
© Stack Overflow or respective owner