Hey Guys!
I'm new here and I have a question.
I have a array with two dimension. I wanna delete the first row of my two-dimensional array and copy/fill it in a one-dimensional array. My problem is the two-dimensional array. How can I delete the first row and reduce this array?? I have a lot of datasets so I need a quick/the quickest way?
Could you help me? That would be great! Thanks!!
Loading
Kirtan PatelPosted May 17, 2010, 1:05 AM
int[,] x = { {1,2,3},{4,5,6},{7,8,9}};
int[] y = new int[x.Length -3];
int c=0;
for (int i = 0; i <3; i++)
{
/* Neglacting First Row */
if (i == 0)
{
continue;
}
for (int j = 0; j < 3; j++)
{
y[c] = x[i, j];
c = c + 1;
}
}
for (int i = 0; i <= y.Length - 1; i++)
{
listBox1.Items.Add(y[i]);
}
Dipa AhujaPosted May 16, 2010, 12:57 PM
");
");